From b7103fbcef86554476871ad363e2a6b3bad0b77e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 13 Nov 2011 19:58:04 +0300 Subject: Change chat logs dirs format to yyyy-mm/dd/file.log. --- src/chatlogger.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/chatlogger.h') diff --git a/src/chatlogger.h b/src/chatlogger.h index 6e096ac89..23d5d4a86 100644 --- a/src/chatlogger.h +++ b/src/chatlogger.h @@ -40,8 +40,6 @@ class ChatLogger */ ~ChatLogger(); - void setLogDir(const std::string &logDir); - /** * Enters a message in the log. The message will be timestamped. */ @@ -52,26 +50,30 @@ class ChatLogger void loadLast(std::string name, std::list &list, unsigned n); - std::string getDateString() const; + std::string getDir() const; std::string secureName(std::string &str) const; void setServerName(const std::string &serverName); + void setBaseLogDir(const std::string &logDir) + { mBaseLogDir = logDir; } + private: /** * Sets the file to log to and opens it */ void setLogFile(const std::string &logFilename); - void writeTo(std::ofstream &file, const std::string &str) const; + void setLogDir(const std::string &logDir); - void makeDir(const std::string &dir); + void writeTo(std::ofstream &file, const std::string &str) const; std::ofstream mLogFile; std::string mLogDir; + std::string mBaseLogDir; std::string mServerName; - std::string mLogDate; + std::string mLogFileName; }; extern ChatLogger *chatLogger; -- cgit v1.2.3-60-g2f50