]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Add log header including ircd version
authorDaniel De Graaf <danieldg@inspircd.org>
Wed, 28 Apr 2010 19:39:00 +0000 (14:39 -0500)
committerDaniel De Graaf <danieldg@inspircd.org>
Wed, 28 Apr 2010 20:33:27 +0000 (15:33 -0500)
include/inspircd.h
src/logger.cpp
src/modmanager_dynamic.cpp
src/server.cpp

index d973fb66c0d894601cc019f39ff8df00b5f25345..9568750c2db84513ec26b1b736460d82e45cfd31 100644 (file)
@@ -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
index ac171027c4d0e044e002589bec530cd20c44a2cd..2e3f556c6c7ddb4eded7afef28739e51326453d3 100644 (file)
@@ -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);
        }
 }
index c0114ed4eb8714c4eb50f8efa5cb5316dc25cfc4..3845fd6da45e50b9679f73c4a743f461cce8792f 100644 (file)
@@ -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)
index 822b466241b0bc459f09480818ec891ccc0fc76a..8c8e1b0dc35a4d076478a43312349c77a786a6a8 100644 (file)
@@ -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...