From 3f76b8fb1a36e620cee81685769004742c1e402d Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Sat, 13 Sep 2014 15:53:32 +0300 Subject: [PATCH] log: use more clear defaults Before log module creates everything in same directory and it gets messy in some time. Now log module creates directory in format $USER/$NETWORK/$WINDOW and there log files for every day in ISO 8601 format, YYYY-MM-DD.log. --- modules/log.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/log.cpp b/modules/log.cpp index eaaa37b5..2ab0d0b6 100644 --- a/modules/log.cpp +++ b/modules/log.cpp @@ -149,21 +149,21 @@ bool CLogMod::OnLoad(const CString& sArgs, CString& sMessage) if (!m_sLogPath.empty()) { m_sLogPath += "/"; } - m_sLogPath += "$NETWORK_$WINDOW_%Y%m%d.log"; + m_sLogPath += "$NETWORK/$WINDOW/%Y-%m-%d.log"; } } else if (GetType() == CModInfo::NetworkModule) { if (m_sLogPath.Right(1) == "/" || m_sLogPath.find("$WINDOW") == CString::npos) { if (!m_sLogPath.empty()) { m_sLogPath += "/"; } - m_sLogPath += "$WINDOW_%Y%m%d.log"; + m_sLogPath += "$WINDOW/%Y-%m-%d.log"; } } else { if (m_sLogPath.Right(1) == "/" || m_sLogPath.find("$USER") == CString::npos || m_sLogPath.find("$WINDOW") == CString::npos || m_sLogPath.find("$NETWORK") == CString::npos) { if (!m_sLogPath.empty()) { m_sLogPath += "/"; } - m_sLogPath += "$USER_$NETWORK_$WINDOW_%Y%m%d.log"; + m_sLogPath += "$USER/$NETWORK/$WINDOW/%Y-%m-%d.log"; } }