only use pid in log filename if app name is not set
This commit is contained in:
parent
f1b9c24dbd
commit
f2459a4ae8
|
@ -36,7 +36,7 @@ SnoreLog::SnoreLog(SnoreDebugLevels lvl):
|
||||||
|
|
||||||
SnoreLog::~SnoreLog()
|
SnoreLog::~SnoreLog()
|
||||||
{
|
{
|
||||||
static std::ofstream m_logg(QString("%1/libsnore/%2-%3-log.txt").arg(QDir::tempPath(), qApp->applicationName(), QString::number(qApp->applicationPid())).toUtf8().constData());
|
static std::ofstream m_logg(QString("%1/libsnore/%2-log.txt").arg(QDir::tempPath(), qApp->applicationName().isEmpty()?QString::number(qApp->applicationPid()):qApp->applicationName()).toUtf8().constData());
|
||||||
static QMutex m_mutex;
|
static QMutex m_mutex;
|
||||||
QMutexLocker lock(&m_mutex);
|
QMutexLocker lock(&m_mutex);
|
||||||
if(debugLvl() >= m_lvl)
|
if(debugLvl() >= m_lvl)
|
||||||
|
|
Loading…
Reference in New Issue