void InspIRCd::Log(int level, const char* text, ...)
{
/* sanity check, just in case */
- if (!this->Config)
+ if (!this->Config || !this->Logger)
return;
/* Do this check again here so that we save pointless vsnprintf calls */
void InspIRCd::Log(int level, const std::string &text)
{
/* sanity check, just in case */
- if (!this->Config)
+ if (!this->Config || !this->Logger)
return;
/* If we were given -debug we output all messages, regardless of configured loglevel */
}
/* return true for good ident, false else */
-bool InspIRCd::IsIdent(const char* n)
+bool IsIdentHandler::Call(const char* n)
{
if (!n || !*n)
return false;
}
/* open the proper logfile */
-void InspIRCd::OpenLog(char** argv, int argc)
+bool InspIRCd::OpenLog(char** argv, int argc)
{
Config->MyDir = Config->GetFullProgDir();
if (!Config->log_file)
{
- printf("ERROR: Could not write to logfile %s: %s\n\n", Config->logpath.c_str(), strerror(errno));
- Exit(EXIT_STATUS_LOG);
+ this->Logger = NULL;
+ return false;
}
this->Logger = new FileLogger(this, Config->log_file);
+ return true;
}
void InspIRCd::CheckRoot()