diff options
Diffstat (limited to 'src/inspircd.cpp')
| -rw-r--r-- | src/inspircd.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 6b9dbaebc..6ff69b881 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -147,20 +147,20 @@ namespace errno = 0; if (setgroups(0, nullptr) == -1) { - ServerInstance->Logs.Normal("STARTUP", "setgroups() failed (wtf?): %s", strerror(errno)); + ServerInstance->Logs.Error("STARTUP", "setgroups() failed (wtf?): %s", strerror(errno)); InspIRCd::QuickExit(EXIT_STATUS_CONFIG); } struct group* g = getgrnam(SetGroup.c_str()); if (!g) { - ServerInstance->Logs.Normal("STARTUP", "getgrnam(%s) failed (wrong group?): %s", SetGroup.c_str(), strerror(errno)); + ServerInstance->Logs.Error("STARTUP", "getgrnam(%s) failed (wrong group?): %s", SetGroup.c_str(), strerror(errno)); InspIRCd::QuickExit(EXIT_STATUS_CONFIG); } if (setgid(g->gr_gid) == -1) { - ServerInstance->Logs.Normal("STARTUP", "setgid(%d) failed (wrong group?): %s", g->gr_gid, strerror(errno)); + ServerInstance->Logs.Error("STARTUP", "setgid(%d) failed (wrong group?): %s", g->gr_gid, strerror(errno)); InspIRCd::QuickExit(EXIT_STATUS_CONFIG); } } @@ -172,13 +172,13 @@ namespace struct passwd* u = getpwnam(SetUser.c_str()); if (!u) { - ServerInstance->Logs.Normal("STARTUP", "getpwnam(%s) failed (wrong user?): %s", SetUser.c_str(), strerror(errno)); + ServerInstance->Logs.Error("STARTUP", "getpwnam(%s) failed (wrong user?): %s", SetUser.c_str(), strerror(errno)); InspIRCd::QuickExit(EXIT_STATUS_CONFIG); } if (setuid(u->pw_uid) == -1) { - ServerInstance->Logs.Normal("STARTUP", "setuid(%d) failed (wrong user?): %s", u->pw_uid, strerror(errno)); + ServerInstance->Logs.Error("STARTUP", "setuid(%d) failed (wrong user?): %s", u->pw_uid, strerror(errno)); InspIRCd::QuickExit(EXIT_STATUS_CONFIG); } } @@ -232,7 +232,7 @@ namespace int childpid = fork(); if (childpid < 0) { - ServerInstance->Logs.Normal("STARTUP", "fork() failed: %s", strerror(errno)); + ServerInstance->Logs.Error("STARTUP", "fork() failed: %s", strerror(errno)); std::cout << rang::style::bold << rang::fg::red << "Error:" << rang::style::reset << " unable to fork into background: " << strerror(errno); ServerInstance->Exit(EXIT_STATUS_FORK); } @@ -263,13 +263,13 @@ namespace rlimit rl; if (getrlimit(RLIMIT_CORE, &rl) == -1) { - ServerInstance->Logs.Normal("STARTUP", "Unable to increase core dump size: getrlimit(RLIMIT_CORE) failed: %s", strerror(errno)); + ServerInstance->Logs.Warning("STARTUP", "Unable to increase core dump size: getrlimit(RLIMIT_CORE) failed: %s", strerror(errno)); return; } rl.rlim_cur = rl.rlim_max; if (setrlimit(RLIMIT_CORE, &rl) == -1) - ServerInstance->Logs.Normal("STARTUP", "Unable to increase core dump size: setrlimit(RLIMIT_CORE) failed: %s", strerror(errno)); + ServerInstance->Logs.Warning("STARTUP", "Unable to increase core dump size: setrlimit(RLIMIT_CORE) failed: %s", strerror(errno)); #endif } @@ -449,7 +449,7 @@ void InspIRCd::WritePID() else { std::cout << "Failed to write PID-file '" << pidfile << "', exiting." << std::endl; - this->Logs.Normal("STARTUP", "Failed to write PID-file '%s', exiting.", pidfile.c_str()); + this->Logs.Error("STARTUP", "Failed to write PID-file '%s', exiting.", pidfile.c_str()); Exit(EXIT_STATUS_PID); } } @@ -497,7 +497,7 @@ InspIRCd::InspIRCd(int argc, char** argv) if (!FindConfigFile(ConfigFileName)) { - this->Logs.Normal("STARTUP", "Unable to open config file %s", ConfigFileName.c_str()); + this->Logs.Error("STARTUP", "Unable to open config file %s", ConfigFileName.c_str()); std::cout << "ERROR: Cannot open config file: " << ConfigFileName << std::endl << "Exiting..." << std::endl; Exit(EXIT_STATUS_CONFIG); } @@ -565,7 +565,7 @@ InspIRCd::InspIRCd(int argc, char** argv) if (kill(getppid(), SIGTERM) == -1) { std::cout << "Error killing parent process: " << strerror(errno) << std::endl; - Logs.Normal("STARTUP", "Error killing parent process: %s", strerror(errno)); + Logs.Warning("STARTUP", "Error killing parent process: %s", strerror(errno)); } } @@ -588,11 +588,11 @@ InspIRCd::InspIRCd(int argc, char** argv) fclose(stdout); if (dup2(fd, STDIN_FILENO) < 0) - Logs.Normal("STARTUP", "Failed to dup /dev/null to stdin."); + Logs.Warning("STARTUP", "Failed to dup /dev/null to stdin."); if (dup2(fd, STDOUT_FILENO) < 0) - Logs.Normal("STARTUP", "Failed to dup /dev/null to stdout."); + Logs.Warning("STARTUP", "Failed to dup /dev/null to stdout."); if (dup2(fd, STDERR_FILENO) < 0) - Logs.Normal("STARTUP", "Failed to dup /dev/null to stderr."); + Logs.Warning("STARTUP", "Failed to dup /dev/null to stderr."); close(fd); } else @@ -649,7 +649,7 @@ void InspIRCd::Run() if (this->ConfigThread && this->ConfigThread->IsDone()) { /* Rehash has completed */ - this->Logs.Debug("CONFIG", "New configuration has been read, applying..."); + this->Logs.Normal("CONFIG", "New configuration has been read, applying..."); ConfigThread->Stop(); stdalgo::delete_zero(ConfigThread); } |
