summaryrefslogtreecommitdiff
path: root/src/chatlogger.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-13 19:58:04 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-13 19:58:04 +0300
commitb7103fbcef86554476871ad363e2a6b3bad0b77e (patch)
tree263d71fdd32dbbc0026c10274b4d7fa54c30f25c /src/chatlogger.h
parentbc6e0ea4d7042ad48164b8bad69bff02ca5f8a5a (diff)
downloadmanaplus-b7103fbcef86554476871ad363e2a6b3bad0b77e.tar.gz
manaplus-b7103fbcef86554476871ad363e2a6b3bad0b77e.tar.bz2
manaplus-b7103fbcef86554476871ad363e2a6b3bad0b77e.tar.xz
manaplus-b7103fbcef86554476871ad363e2a6b3bad0b77e.zip
Change chat logs dirs format to yyyy-mm/dd/file.log.
Diffstat (limited to 'src/chatlogger.h')
-rw-r--r--src/chatlogger.h14
1 files changed, 8 insertions, 6 deletions
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<std::string> &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;