mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
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:
parent
167800320f
commit
607347289e
@ -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;
|
||||
|
||||
@ -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; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user