diff options
author | Daniel De Graaf <danieldg@inspircd.org> | 2010-04-28 14:39:00 -0500 |
---|---|---|
committer | Daniel De Graaf <danieldg@inspircd.org> | 2010-04-28 15:33:27 -0500 |
commit | 43d893c7196dfa159b39fc5de3a10f00d59200b4 (patch) | |
tree | c202a42bb589fd1b232c764ca8937c07f859b62d | |
parent | c28b7526d1b0c7197c4098e62746f1bd62c8fac4 (diff) |
Add log header including ircd version
-rw-r--r-- | include/inspircd.h | 2 | ||||
-rw-r--r-- | src/logger.cpp | 1 | ||||
-rw-r--r-- | src/modmanager_dynamic.cpp | 4 | ||||
-rw-r--r-- | src/server.cpp | 4 |
4 files changed, 10 insertions, 1 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index d973fb66c..9568750c2 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -328,6 +328,8 @@ class CoreExport InspIRCd */ std::string GetUID(); + static const char LogHeader[]; + /** Find a user in the UUID hash * @param nick The nickname to find * @return A pointer to the user, or NULL if the user does not exist diff --git a/src/logger.cpp b/src/logger.cpp index ac171027c..2e3f556c6 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -112,6 +112,7 @@ void LogManager::OpenFileLogs() fw = fwi->second; } FileLogStream* fls = new FileLogStream(loglevel, fw); + fls->OnLog(SPARSE, "HEADER", InspIRCd::LogHeader); AddLogTypes(type, fls, true); } } diff --git a/src/modmanager_dynamic.cpp b/src/modmanager_dynamic.cpp index c0114ed4e..3845fd6da 100644 --- a/src/modmanager_dynamic.cpp +++ b/src/modmanager_dynamic.cpp @@ -92,7 +92,8 @@ bool ModuleManager::Load(const std::string& filename, bool defer) Modules[filename] = newmod; if (defer) { - ServerInstance->Logs->Log("MODULE", DEFAULT,"New module introduced: %s", filename.c_str()); + ServerInstance->Logs->Log("MODULE", DEFAULT,"New module introduced: %s (Module version %s)", + filename.c_str(), newhandle->GetVersion().c_str()); } else { @@ -251,6 +252,7 @@ void ModuleManager::LoadAll() Module* mod = i->second; try { + ServerInstance->Logs->Log("MODULE", DEBUG, "Initializing %s", i->first.c_str()); mod->init(); } catch (CoreException& modexcept) diff --git a/src/server.cpp b/src/server.cpp index 822b46624..8c8e1b0dc 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -67,6 +67,10 @@ std::string InspIRCd::GetVersionString(bool operstring) return versiondata; } +const char InspIRCd::LogHeader[] = + "Log started for " VERSION " (" REVISION ", " MODULE_INIT_STR ")" + " - compiled on " SYSTEM; + void InspIRCd::BuildISupport() { // the neatest way to construct the initial 005 numeric, considering the number of configure constants to go in it... |