mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 08:33:54 -07:00
Define qtlogging.ini location (#5551)
This commit is contained in:
parent
6c1b7c83ec
commit
4535a70b57
1 changed files with 14 additions and 1 deletions
|
|
@ -177,8 +177,21 @@ int main(int argc, char *argv[])
|
||||||
SetUnhandledExceptionFilter(CockatriceUnhandledExceptionFilter);
|
SetUnhandledExceptionFilter(CockatriceUnhandledExceptionFilter);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef Q_OS_APPLE
|
||||||
|
// <build>/cockatrice/cockatrice.app/Contents/MacOS/cockatrice
|
||||||
|
const QByteArray configPath = "../../../qtlogging.ini";
|
||||||
|
#elif defined(Q_OS_UNIX)
|
||||||
|
// <build>/cockatrice/cockatrice
|
||||||
|
const QByteArray configPath = "./qtlogging.ini";
|
||||||
|
#elif defined(Q_OS_WIN)
|
||||||
|
// <build>/cockatrice/Debug/cockatrice.exe
|
||||||
|
const QByteArray configPath = "../qtlogging.ini";
|
||||||
|
#else
|
||||||
|
const QByteArray configPath = "";
|
||||||
|
#endif
|
||||||
|
|
||||||
// Set the QT_LOGGING_CONF environment variable
|
// Set the QT_LOGGING_CONF environment variable
|
||||||
qputenv("QT_LOGGING_CONF", "./qtlogging.ini");
|
qputenv("QT_LOGGING_CONF", configPath);
|
||||||
qSetMessagePattern(
|
qSetMessagePattern(
|
||||||
"\033[0m[%{time yyyy-MM-dd h:mm:ss.zzz} "
|
"\033[0m[%{time yyyy-MM-dd h:mm:ss.zzz} "
|
||||||
"%{if-debug}\033[36mD%{endif}%{if-info}\033[32mI%{endif}%{if-warning}\033[33mW%{endif}%{if-critical}\033[31mC%{"
|
"%{if-debug}\033[36mD%{endif}%{if-info}\033[32mI%{endif}%{if-warning}\033[33mW%{endif}%{if-critical}\033[31mC%{"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue