Expose more of the logger state

It is better to rely on the Logger state to know exactly where we're
logging. Indeed due to the the various ways to impact its state the
config alone might not now where we're logging.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
Kevin Ottens 2020-10-05 19:36:25 +02:00 committed by Michael Schuster (Rebase PR Action)
parent 167800320f
commit 607347289e
2 changed files with 16 additions and 0 deletions

View File

@ -167,6 +167,11 @@ void Logger::setLogWindowActivated(bool activated)
_logWindowActivated = activated;
}
QString Logger::logFile() const
{
return _logFile.fileName();
}
void Logger::setLogFile(const QString &name)
{
QMutexLocker locker(&_mutex);
@ -204,6 +209,11 @@ void Logger::setLogExpire(int expire)
_logExpire = expire;
}
QString Logger::logDir() const
{
return _logDirectory;
}
void Logger::setLogDir(const QString &dir)
{
_logDirectory = dir;

View File

@ -60,9 +60,15 @@ public:
void postGuiMessage(const QString &title, const QString &message);
void setLogWindowActivated(bool activated);
QString logFile() const;
void setLogFile(const QString &name);
void setLogExpire(int expire);
QString logDir() const;
void setLogDir(const QString &dir);
void setLogFlush(bool flush);
bool logDebug() const { return _logDebug; }