aboutsummaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-08-11 12:39:49 +0100
committerGravatar Sadie Powell2023-08-11 12:39:49 +0100
commitf73e9e606b61324f4ac34d3f506b7cbaf87713c7 (patch)
tree1ca0ac7ed371483bd1d9a3fbec3959af61067dbb /src/inspircd.cpp
parentMake the linkdata host/unix cloaks longer to test suffix truncation. (diff)
Rename the error log level to critical.
"ERROR" is apparently defined by more than just Windows. Let's pick a different name which is less likely to cause collisions.
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index c6aab7dac..7d92feb85 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -149,20 +149,20 @@ namespace
errno = 0;
if (setgroups(0, nullptr) == -1)
{
- ServerInstance->Logs.Error("STARTUP", "setgroups() failed (wtf?): {}", strerror(errno));
+ ServerInstance->Logs.Critical("STARTUP", "setgroups() failed (wtf?): {}", strerror(errno));
InspIRCd::QuickExit(EXIT_FAILURE);
}
struct group* g = getgrnam(SetGroup.c_str());
if (!g)
{
- ServerInstance->Logs.Error("STARTUP", "getgrnam({}) failed (wrong group?): {}", SetGroup, strerror(errno));
+ ServerInstance->Logs.Critical("STARTUP", "getgrnam({}) failed (wrong group?): {}", SetGroup, strerror(errno));
InspIRCd::QuickExit(EXIT_FAILURE);
}
if (setgid(g->gr_gid) == -1)
{
- ServerInstance->Logs.Error("STARTUP", "setgid({}) failed (wrong group?): {}", g->gr_gid, strerror(errno));
+ ServerInstance->Logs.Critical("STARTUP", "setgid({}) failed (wrong group?): {}", g->gr_gid, strerror(errno));
InspIRCd::QuickExit(EXIT_FAILURE);
}
}
@@ -174,13 +174,13 @@ namespace
struct passwd* u = getpwnam(SetUser.c_str());
if (!u)
{
- ServerInstance->Logs.Error("STARTUP", "getpwnam({}) failed (wrong user?): {}", SetUser, strerror(errno));
+ ServerInstance->Logs.Critical("STARTUP", "getpwnam({}) failed (wrong user?): {}", SetUser, strerror(errno));
InspIRCd::QuickExit(EXIT_FAILURE);
}
if (setuid(u->pw_uid) == -1)
{
- ServerInstance->Logs.Error("STARTUP", "setuid({}) failed (wrong user?): {}", u->pw_uid, strerror(errno));
+ ServerInstance->Logs.Critical("STARTUP", "setuid({}) failed (wrong user?): {}", u->pw_uid, strerror(errno));
InspIRCd::QuickExit(EXIT_FAILURE);
}
}
@@ -234,7 +234,7 @@ namespace
int childpid = fork();
if (childpid < 0)
{
- ServerInstance->Logs.Error("STARTUP", "fork() failed: {}", strerror(errno));
+ ServerInstance->Logs.Critical("STARTUP", "fork() failed: {}", strerror(errno));
fmt::println("{} unable to fork into background: {}", fmt::styled("Error:", fmt::emphasis::bold | fmt::fg(fmt::terminal_color::red)), strerror(errno));
ServerInstance->Exit(EXIT_FAILURE);
}
@@ -446,7 +446,7 @@ void InspIRCd::WritePID()
else
{
fmt::println("Failed to write PID-file '{}', exiting.", pidfile);
- this->Logs.Error("STARTUP", "Failed to write PID-file '{}', exiting.", pidfile);
+ this->Logs.Critical("STARTUP", "Failed to write PID-file '{}', exiting.", pidfile);
Exit(EXIT_FAILURE);
}
}
@@ -489,7 +489,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
if (!FindConfigFile(ConfigFileName))
{
- this->Logs.Error("STARTUP", "Unable to open config file {}", ConfigFileName);
+ this->Logs.Critical("STARTUP", "Unable to open config file {}", ConfigFileName);
fmt::println("ERROR: Cannot open config file: {}", ConfigFileName);
fmt::println("Exiting...");
Exit(EXIT_FAILURE);