]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/helperfuncs.cpp
debug
[user/henk/code/inspircd.git] / src / helperfuncs.cpp
index 487af4511fde55efa2e9261b0044d4cd89921b09..67faee8f54371fd77dc814cf56c5c8e79ac413ab 100644 (file)
 #include "xline.h"
 #include "exitcodes.h"
 
-/** Log()
- *  Write a line of text `text' to the logfile (and stdout, if in nofork) if the level `level'
- *  is greater than the configured loglevel.
- */
-void InspIRCd::Log(int level, const char* text, ...)
-{
-       va_list argsPtr;
-       char textbuffer[65536];
-
-       va_start(argsPtr, text);
-       vsnprintf(textbuffer, 65536, text, argsPtr);
-       va_end(argsPtr);
-
-       this->Log(level, std::string(textbuffer));
-}
-
-void InspIRCd::Log(int level, const std::string &text)
-{
-       this->Logs->Log("DEPRECATED", level, "Deprecated use of InspIRCd::Log(), message = %s", text.c_str());
-}
-
 std::string InspIRCd::GetServerDescription(const char* servername)
 {
        std::string description;
@@ -342,7 +321,7 @@ void InspIRCd::CheckRoot()
        if (geteuid() == 0)
        {
                printf("WARNING!!! You are running an irc server as ROOT!!! DO NOT DO THIS!!!\n\n");
-               this->Log(DEFAULT,"Cant start as root");
+               this->Logs->Log("STARTUP",DEFAULT,"Cant start as root");
                Exit(EXIT_STATUS_ROOT);
        }
 }
@@ -352,7 +331,7 @@ void InspIRCd::CheckDie()
        if (*Config->DieValue)
        {
                printf("WARNING: %s\n\n",Config->DieValue);
-               this->Log(DEFAULT,"Died because of <die> tag: %s",Config->DieValue);
+               this->Logs->Log("CONFIG",DEFAULT,"Died because of <die> tag: %s",Config->DieValue);
                Exit(EXIT_STATUS_DIETAG);
        }
 }