diff options
author | aquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-15 13:30:46 +0000 |
---|---|---|
committer | aquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-15 13:30:46 +0000 |
commit | 11f1f2126c3e1f1cb91f5d6e273eba2850ca61a8 (patch) | |
tree | 8bd6949852d761fe8976d4195af26653c3e702b8 /src/filelogger.cpp | |
parent | 7bd02d8a5dbac685d53a3f2aac9052c6ab5efa6e (diff) |
Make -nofork work properly with logging now.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8944 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/filelogger.cpp')
-rw-r--r-- | src/filelogger.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/filelogger.cpp b/src/filelogger.cpp index b0eb77310..fd86e4594 100644 --- a/src/filelogger.cpp +++ b/src/filelogger.cpp @@ -42,7 +42,9 @@ void FileLogStream::OnLog(int loglevel, const std::string &type, const std::stri /* If we were given -debug we output all messages, regardless of configured loglevel */ if ((loglevel < this->loglvl) && !ServerInstance->Config->forcedebug) + { return; + } if (ServerInstance->Time() != LAST) { @@ -54,14 +56,6 @@ void FileLogStream::OnLog(int loglevel, const std::string &type, const std::stri LAST = ServerInstance->Time(); } - if (ServerInstance->Config->log_file && ServerInstance->Config->writelog) - { - std::string out = std::string(TIMESTR) + " " + text.c_str() + "\n"; - this->f->WriteLogLine(out); - } - - if (ServerInstance->Config->nofork) - { - printf("%s %s\n", TIMESTR, text.c_str()); - } + std::string out = std::string(TIMESTR) + " " + text.c_str() + "\n"; + this->f->WriteLogLine(out); } |