mirror of
https://github.com/QuasarApp/QuasarAppLib.git
synced 2025-04-26 17:54:40 +00:00
fix standart path location
This commit is contained in:
parent
6b8bb9f2cd
commit
86c9036f13
@ -9,7 +9,9 @@
|
||||
#include "params.h"
|
||||
#include <iostream>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QFile>
|
||||
#include <QStandardPaths>
|
||||
|
||||
namespace QuasarAppUtils {
|
||||
|
||||
@ -91,7 +93,7 @@ void QALogger::init() {
|
||||
|
||||
if (Params::isEndable("fileLog")) {
|
||||
_toFile = true;
|
||||
QString path = Params::getCurrentExecutable() + ".log";
|
||||
QString path = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/" + QCoreApplication::applicationName() + ".log";
|
||||
auto file = Params::getArg("fileLog");
|
||||
if (file.size()) {
|
||||
path = file;
|
||||
|
@ -25,6 +25,8 @@ namespace QuasarAppUtils {
|
||||
*
|
||||
* QuasarAppUtils::QALogger logger;
|
||||
*
|
||||
* QuasarAppUtils::Params::setEnable("fileLog", true); //force enable file writing using efault file location - located in localApplication data.
|
||||
*
|
||||
* QuasarAppUtils::Params::parseParams(argc, argv);
|
||||
*
|
||||
* logger.init();
|
||||
|
Loading…
x
Reference in New Issue
Block a user