diff options
author | Adam <Adam@anope.org> | 2013-04-07 23:46:44 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-04-07 23:46:44 -0500 |
commit | fb7fef7a849342ab8463743497e781c5c3e6ae88 (patch) | |
tree | 5d230a68b6eed70c7b4f718410dd62fea779654c /include/logger.h | |
parent | 36602224b8b1a11326a224779d16bcb12f0ed532 (diff) |
Optimizations of much of the more commonly used code
Diffstat (limited to 'include/logger.h')
-rw-r--r-- | include/logger.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/include/logger.h b/include/logger.h index 5050c22ce..afa874ca3 100644 --- a/include/logger.h +++ b/include/logger.h @@ -45,7 +45,8 @@ struct LogFile std::ofstream stream; LogFile(const Anope::string &name); - Anope::string GetName() const; + ~LogFile(); + const Anope::string &GetName() const; }; /* Represents a single log message */ @@ -72,7 +73,6 @@ class CoreExport Log Module *m; LogType type; Anope::string category; - std::list<Anope::string> sources; std::stringstream buf; @@ -109,17 +109,18 @@ class CoreExport Log class CoreExport LogInfo { public: - std::list<Anope::string> targets; - std::map<Anope::string, LogFile *> logfiles; - std::list<Anope::string> sources; + std::vector<Anope::string> targets; + std::vector<LogFile *> logfiles; + int last_day; + std::vector<Anope::string> sources; int log_age; - std::list<Anope::string> admin; - std::list<Anope::string> override; - std::list<Anope::string> commands; - std::list<Anope::string> servers; - std::list<Anope::string> users; - std::list<Anope::string> channels; - std::list<Anope::string> normal; + std::vector<Anope::string> admin; + std::vector<Anope::string> override; + std::vector<Anope::string> commands; + std::vector<Anope::string> servers; + std::vector<Anope::string> users; + std::vector<Anope::string> channels; + std::vector<Anope::string> normal; bool raw_io; bool debug; @@ -127,7 +128,7 @@ class CoreExport LogInfo ~LogInfo(); - void AddType(std::list<Anope::string> &list, const Anope::string &type); + void OpenLogFiles(); bool HasType(LogType ltype, const Anope::string &type) const; |