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