diff options
| author | 2022-12-18 13:43:33 +0000 | |
|---|---|---|
| committer | 2022-12-18 13:43:33 +0000 | |
| commit | d8b4414ee18be69eb7c6c491587e4895dc995fac (patch) | |
| tree | 5aebcbacc529d29c622974df798f4aa42d28f518 /src | |
| parent | Update /MOTD to match /OPERMOTD. (diff) | |
Rework the levels things are logged at to make more sense.
Diffstat (limited to 'src')
37 files changed, 102 insertions, 103 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 457956387..a67be7ff3 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -132,7 +132,7 @@ Membership* Channel::GetUser(User* user) const void Channel::SetDefaultModes() { - ServerInstance->Logs.Debug("CHANNELS", "SetDefaultModes %s", + ServerInstance->Logs.Debug("CHANNELS", "Setting default modes on %s: %s", name.c_str(), ServerInstance->Config->DefaultModes.c_str()); irc::spacesepstream list(ServerInstance->Config->DefaultModes); std::string modeseq; diff --git a/src/commands.cpp b/src/commands.cpp index c35e5d2cb..0809a6a29 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -100,7 +100,7 @@ CmdResult SplitCommand::Handle(User* user, const Params& parameters) return HandleServer(static_cast<FakeUser*>(user), parameters); } - ServerInstance->Logs.Normal("COMMAND", "Unknown user type %u in command (uuid=%s)!", + ServerInstance->Logs.Debug("COMMAND", "Unknown user type %u in command (uuid=%s)!", static_cast<unsigned int>(user->usertype), user->uuid.c_str()); return CmdResult::INVALID; } diff --git a/src/configparser.cpp b/src/configparser.cpp index 04ddd763b..01503656c 100644 --- a/src/configparser.cpp +++ b/src/configparser.cpp @@ -430,12 +430,12 @@ FilePtr ParseStack::DoOpenFile(const std::string& name, bool isexec) { if (getegid() != pathinfo.st_gid) { - ServerInstance->Logs.Normal("CONFIG", "Possible configuration error: %s is owned by group %u but the server is running as group %u.", + ServerInstance->Logs.Warning("CONFIG", "Possible configuration error: %s is owned by group %u but the server is running as group %u.", name.c_str(), pathinfo.st_gid, getegid()); } if (geteuid() != pathinfo.st_uid) { - ServerInstance->Logs.Normal("CONFIG", "Possible configuration error: %s is owned by user %u but the server is running as user %u.", + ServerInstance->Logs.Warning("CONFIG", "Possible configuration error: %s is owned by user %u but the server is running as user %u.", name.c_str(), pathinfo.st_uid, geteuid()); } } @@ -542,7 +542,7 @@ bool ParseStack::ParseFile(const std::string& path, int flags, const std::string void ConfigTag::LogMalformed(const std::string& key, const std::string& val, const std::string& def, const std::string& reason) const { - ServerInstance->Logs.Normal("CONFIG", "The value of <%s:%s> at %s (%s) is %s; using the default (%s) instead.", + ServerInstance->Logs.Warning("CONFIG", "The value of <%s:%s> at %s (%s) is %s; using the default (%s) instead.", name.c_str(), key.c_str(), source.str().c_str(), val.c_str(), reason.c_str(), def.c_str()); } @@ -556,7 +556,7 @@ bool ConfigTag::readString(const std::string& key, std::string& value, bool allo value = ivalue; if (!allow_lf && (value.find('\n') != std::string::npos)) { - ServerInstance->Logs.Normal("CONFIG", "Value of <" + name + ":" + key + "> at " + source.str() + + ServerInstance->Logs.Warning("CONFIG", "Value of <" + name + ":" + key + "> at " + source.str() + " contains a linefeed, and linefeeds in this value are not permitted -- stripped to spaces."); for (auto& chr : value) diff --git a/src/configreader.cpp b/src/configreader.cpp index 053e990dc..fc2fcb131 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -563,7 +563,7 @@ std::shared_ptr<ConfigTag> ServerConfig::ConfValue(const std::string& tag, std:: if (tags.count() > 1) { - ServerInstance->Logs.Normal("CONFIG", "Multiple (%zu) <%s> tags found; only the first will be used (first at %s, last at %s)", + ServerInstance->Logs.Warning("CONFIG", "Multiple (%zu) <%s> tags found; only the first will be used (first at %s, last at %s)", tags.count(), tag.c_str(), tags.begin()->second->source.str().c_str(), std::prev(tags.end())->second->source.str().c_str()); } return tags.begin()->second; @@ -608,7 +608,7 @@ std::vector<std::string> ServerConfig::GetModules() const const std::string shortname = ModuleManager::ShrinkModName(tag->getString("name")); if (shortname.empty()) { - ServerInstance->Logs.Normal("CONFIG", "Malformed <module> tag at " + tag->source.str() + "; skipping ..."); + ServerInstance->Logs.Warning("CONFIG", "Malformed <module> tag at " + tag->source.str() + "; skipping ..."); continue; } @@ -644,7 +644,7 @@ void ConfigReaderThread::OnStart() void ConfigReaderThread::OnStop() { ServerConfig* old = ServerInstance->Config; - ServerInstance->Logs.Debug("CONFIG", "Switching to new configuration..."); + ServerInstance->Logs.Normal("CONFIG", "Switching to new configuration..."); ServerInstance->Config = this->Config; Config->Apply(old, UUID); @@ -670,7 +670,8 @@ void ConfigReaderThread::OnStop() } catch (const CoreException& modex) { - ServerInstance->Logs.Normal("MODULE", "Exception caught: " + modex.GetReason()); + ServerInstance->Logs.Error("MODULE", "Unable to read the configuration for %s: %s", + mod->ModuleSourceFile.c_str(), modex.what()); if (user) user->WriteNotice(modname + ": " + modex.GetReason()); } @@ -686,7 +687,7 @@ void ConfigReaderThread::OnStop() } catch (const CoreException& ex) { - ServerInstance->Logs.Normal("LOG", "Cannot open log files: " + ex.GetReason()); + ServerInstance->Logs.Error("LOG", "Cannot open log files: " + ex.GetReason()); if (user) user->WriteNotice("Cannot open log files: " + ex.GetReason()); } diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp index 6b25baec2..7ddc70dd5 100644 --- a/src/coremods/core_dns.cpp +++ b/src/coremods/core_dns.cpp @@ -813,7 +813,7 @@ public: } if (bindto.family() != myserver.family()) - ServerInstance->Logs.Error(MODNAME, "Nameserver address family differs from source address family - hostnames might not resolve"); + ServerInstance->Logs.Warning(MODNAME, "Nameserver address family differs from source address family - hostnames might not resolve"); } else { @@ -864,7 +864,7 @@ class ModuleDNS final } } - ServerInstance->Logs.Normal(MODNAME, "No viable nameserver found! Defaulting to nameserver '127.0.0.1'!"); + ServerInstance->Logs.Warning(MODNAME, "No viable nameserver found! Defaulting to nameserver '127.0.0.1'!"); #else // attempt to look up their nameserver from /etc/resolv.conf ServerInstance->Logs.Normal(MODNAME, "WARNING: <dns:server> not defined, attempting to find working server in /etc/resolv.conf..."); @@ -884,7 +884,7 @@ class ModuleDNS final } } - ServerInstance->Logs.Normal(MODNAME, "/etc/resolv.conf contains no viable nameserver entries! Defaulting to nameserver '127.0.0.1'!"); + ServerInstance->Logs.Warning(MODNAME, "/etc/resolv.conf contains no viable nameserver entries! Defaulting to nameserver '127.0.0.1'!"); #endif DNSServer = "127.0.0.1"; } diff --git a/src/coremods/core_info/core_info.cpp b/src/coremods/core_info/core_info.cpp index 831ed8838..5ebf9b01c 100644 --- a/src/coremods/core_info/core_info.cpp +++ b/src/coremods/core_info/core_info.cpp @@ -142,7 +142,7 @@ public: catch (const CoreException& ce) { // We can't process the file if it doesn't exist. - ServerInstance->Logs.Normal(MODNAME, "Unable to read motd for connect class \"%s\" at %s: %s", + ServerInstance->Logs.Warning(MODNAME, "Unable to read motd for connect class \"%s\" at %s: %s", klass->name.c_str(), klass->config->source.str().c_str(), ce.GetReason().c_str()); continue; } 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); } diff --git a/src/listensocket.cpp b/src/listensocket.cpp index 821191245..ac5698402 100644 --- a/src/listensocket.cpp +++ b/src/listensocket.cpp @@ -141,10 +141,10 @@ ListenSocket::~ListenSocket() SocketEngine::Shutdown(this, 2); if (SocketEngine::Close(this) != 0) - ServerInstance->Logs.Debug("SOCKET", "Failed to cancel listener: %s", strerror(errno)); + ServerInstance->Logs.Warning("SOCKET", "Failed to close listener: %s", strerror(errno)); if (bind_sa.family() == AF_UNIX && unlink(bind_sa.un.sun_path)) - ServerInstance->Logs.Debug("SOCKET", "Failed to unlink UNIX socket: %s", strerror(errno)); + ServerInstance->Logs.Warning("SOCKET", "Failed to unlink UNIX socket: %s", strerror(errno)); } } diff --git a/src/listmode.cpp b/src/listmode.cpp index d9f730923..2e20c527f 100644 --- a/src/listmode.cpp +++ b/src/listmode.cpp @@ -93,7 +93,7 @@ void ListModeBase::DoRehash() // If no default limit has been specified then insert one. if (!seen_default) { - ServerInstance->Logs.Debug("MODE", "No default <maxlist> entry was found for the %s mode; defaulting to %u", + ServerInstance->Logs.Warning("MODE", "No default <maxlist> entry was found for the %s mode; defaulting to %u", name.c_str(), DEFAULT_LIST_SIZE); newlimits.push_back(ListLimit("*", DEFAULT_LIST_SIZE)); } diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp index 0281541b0..af5826fc1 100644 --- a/src/modulemanager.cpp +++ b/src/modulemanager.cpp @@ -48,14 +48,14 @@ bool ModuleManager::Load(const std::string& modname, bool defer) if (!std::filesystem::is_regular_file(moduleFile, ec)) { LastModuleError = "Module file could not be found: " + filename; - ServerInstance->Logs.Normal("MODULE", LastModuleError); + ServerInstance->Logs.Error("MODULE", LastModuleError); return false; } if (Modules.find(filename) != Modules.end()) { LastModuleError = "Module " + filename + " is already loaded, cannot load a module twice!"; - ServerInstance->Logs.Normal("MODULE", LastModuleError); + ServerInstance->Logs.Error("MODULE", LastModuleError); return false; } @@ -97,7 +97,7 @@ bool ModuleManager::Load(const std::string& modname, bool defer) else { LastModuleError = "Unable to load " + filename + ": " + newhandle->LastError(); - ServerInstance->Logs.Normal("MODULE", LastModuleError); + ServerInstance->Logs.Error("MODULE", LastModuleError); delete newhandle; return false; } @@ -115,7 +115,7 @@ bool ModuleManager::Load(const std::string& modname, bool defer) else delete newhandle; LastModuleError = "Unable to load " + filename + ": " + modexcept.GetReason(); - ServerInstance->Logs.Normal("MODULE", LastModuleError); + ServerInstance->Logs.Error("MODULE", LastModuleError); return false; } @@ -148,7 +148,6 @@ void ModuleManager::LoadCoreModules(std::map<std::string, ServiceList>& servicem if (!Load(name, true)) { - ServerInstance->Logs.Normal("MODULE", this->LastError()); std::cout << std::endl << "[" << rang::style::bold << rang::fg::red << "*" << rang::style::reset << "] " << this->LastError() << std::endl << std::endl; ServerInstance->Exit(EXIT_STATUS_MODULE); } diff --git a/src/modules.cpp b/src/modules.cpp index ed354a680..4f7023ba5 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -364,7 +364,7 @@ bool ModuleManager::PrioritizeHooks() break; if (tries == 19) { - ServerInstance->Logs.Normal("MODULE", "Hook priority dependency loop detected"); + ServerInstance->Logs.Debug("MODULE", "Hook priority dependency loop detected"); return false; } } @@ -378,7 +378,7 @@ bool ModuleManager::CanUnload(Module* mod) if ((modfind == Modules.end()) || (modfind->second != mod) || (mod->dying)) { LastModuleError = "Module " + mod->ModuleSourceFile + " is not loaded, cannot unload it!"; - ServerInstance->Logs.Normal("MODULE", LastModuleError); + ServerInstance->Logs.Error("MODULE", LastModuleError); return false; } @@ -525,7 +525,6 @@ void ModuleManager::LoadAll() std::cout << "[" << rang::style::bold << rang::fg::green << "*" << rang::style::reset << "] Loading module:\t" << rang::style::bold << rang::fg::green << name << rang::style::reset << std::endl; if (!this->Load(name, true)) { - ServerInstance->Logs.Normal("MODULE", this->LastError()); std::cout << std::endl << "[" << rang::style::bold << rang::fg::red << "*" << rang::style::reset << "] " << this->LastError() << std::endl << std::endl; ServerInstance->Exit(EXIT_STATUS_MODULE); } @@ -544,7 +543,7 @@ void ModuleManager::LoadAll() catch (const CoreException& modexcept) { LastModuleError = "Unable to initialize " + modname + ": " + modexcept.GetReason(); - ServerInstance->Logs.Normal("MODULE", LastModuleError); + ServerInstance->Logs.Error("MODULE", LastModuleError); std::cout << std::endl << "[" << rang::style::bold << rang::fg::red << "*" << rang::style::reset << "] " << LastModuleError << std::endl << std::endl; ServerInstance->Exit(EXIT_STATUS_MODULE); } @@ -566,7 +565,7 @@ void ModuleManager::LoadAll() catch (const CoreException& modexcept) { LastModuleError = "Unable to read the configuration for " + modname + ": " + modexcept.GetReason(); - ServerInstance->Logs.Normal("MODULE", LastModuleError); + ServerInstance->Logs.Error("MODULE", LastModuleError); std::cout << std::endl << "[" << rang::style::bold << rang::fg::red << "*" << rang::style::reset << "] " << LastModuleError << std::endl << std::endl; ServerInstance->Exit(EXIT_STATUS_CONFIG); } diff --git a/src/modules/extra/m_argon2.cpp b/src/modules/extra/m_argon2.cpp index e972939fe..305868e0b 100644 --- a/src/modules/extra/m_argon2.cpp +++ b/src/modules/extra/m_argon2.cpp @@ -48,7 +48,7 @@ private: return ARGON2_VERSION_13; } - ServerInstance->Logs.Normal("MODULE", "Unknown Argon2 version (%lu) specified; assuming 13", + ServerInstance->Logs.Warning(MODNAME, "Unknown Argon2 version (%lu) specified; assuming 13", version); return ARGON2_VERSION_13; } diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index 9addb1aeb..dd2125d0b 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -331,7 +331,7 @@ public: unsigned int port = static_cast<unsigned int>(config->getUInt("port", 3306, 1, 65535)); if (!mysql_real_connect(connection, host.c_str(), user.c_str(), pass.c_str(), dbname.c_str(), port, nullptr, CLIENT_IGNORE_SIGPIPE)) { - ServerInstance->Logs.Normal(MODNAME, "Unable to connect to the %s MySQL server: %s", + ServerInstance->Logs.Error(MODNAME, "Unable to connect to the %s MySQL server: %s", GetId().c_str(), mysql_error(connection)); return false; } @@ -340,7 +340,7 @@ public: const std::string charset = config->getString("charset"); if (!charset.empty() && mysql_set_character_set(connection, charset.c_str())) { - ServerInstance->Logs.Normal(MODNAME, "Could not set character set for %s to \"%s\": %s", + ServerInstance->Logs.Error(MODNAME, "Could not set character set for %s to \"%s\": %s", GetId().c_str(), charset.c_str(), mysql_error(connection)); return false; } @@ -349,7 +349,7 @@ public: const std::string initialquery = config->getString("initialquery"); if (!initialquery.empty() && mysql_real_query(connection, initialquery.data(), initialquery.length())) { - ServerInstance->Logs.Normal(MODNAME, "Could not execute initial query \"%s\" for %s: %s", + ServerInstance->Logs.Error(MODNAME, "Could not execute initial query \"%s\" for %s: %s", initialquery.c_str(), name.c_str(), mysql_error(connection)); return false; } diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 912b4f18c..cb9ce1f23 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -279,7 +279,7 @@ public: bool HandleConnectError(const char* reason) { - ServerInstance->Logs.Normal(MODNAME, "Could not connect to the \"%s\" database: %s", + ServerInstance->Logs.Error(MODNAME, "Could not connect to the \"%s\" database: %s", GetId().c_str(), reason); return false; } diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp index 7989c5230..dd4e0b3c2 100644 --- a/src/modules/extra/m_sqlite3.cpp +++ b/src/modules/extra/m_sqlite3.cpp @@ -111,7 +111,7 @@ public: // Even in case of an error conn must be closed sqlite3_close(conn); conn = nullptr; - ServerInstance->Logs.Normal(MODNAME, "WARNING: Could not open DB with id: " + tag->getString("id")); + ServerInstance->Logs.Error(MODNAME, "WARNING: Could not open DB with id: " + tag->getString("id")); } } diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 0e6b83832..77fdfc006 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -505,7 +505,7 @@ namespace GnuTLS else if ((found) && (stripped != priostr)) { // Prio string was set in the config and we ended up with something that works but different - ServerInstance->Logs.Normal(MODNAME, "Priority string for profile \"%s\" contains unknown tokens, stripped to \"%s\"", profilename.c_str(), stripped.c_str()); + ServerInstance->Logs.Warning(MODNAME, "Priority string for profile \"%s\" contains unknown tokens, stripped to \"%s\"", profilename.c_str(), stripped.c_str()); } priostr.swap(stripped); } @@ -1072,14 +1072,14 @@ class ModuleSSLGnuTLS final { if (!stdalgo::string::equalsci(tag->getString("provider"), "gnutls")) { - ServerInstance->Logs.Normal(MODNAME, "Ignoring non-GnuTLS <sslprofile> tag at " + tag->source.str()); + ServerInstance->Logs.Debug(MODNAME, "Ignoring non-GnuTLS <sslprofile> tag at " + tag->source.str()); continue; } std::string name = tag->getString("name"); if (name.empty()) { - ServerInstance->Logs.Normal(MODNAME, "Ignoring <sslprofile> tag without name at " + tag->source.str()); + ServerInstance->Logs.Warning(MODNAME, "Ignoring <sslprofile> tag without name at " + tag->source.str()); continue; } diff --git a/src/modules/extra/m_ssl_mbedtls.cpp b/src/modules/extra/m_ssl_mbedtls.cpp index ee9609cc7..8cc07b16e 100644 --- a/src/modules/extra/m_ssl_mbedtls.cpp +++ b/src/modules/extra/m_ssl_mbedtls.cpp @@ -902,14 +902,14 @@ private: { if (!stdalgo::string::equalsci(tag->getString("provider"), "mbedtls")) { - ServerInstance->Logs.Normal(MODNAME, "Ignoring non-mbedTLS <sslprofile> tag at " + tag->source.str()); + ServerInstance->Logs.Debug(MODNAME, "Ignoring non-mbedTLS <sslprofile> tag at " + tag->source.str()); continue; } std::string name = tag->getString("name"); if (name.empty()) { - ServerInstance->Logs.Normal(MODNAME, "Ignoring <sslprofile> tag without name at " + tag->source.str()); + ServerInstance->Logs.Warning(MODNAME, "Ignoring <sslprofile> tag without name at " + tag->source.str()); continue; } diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index e6a533762..db9499907 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -948,14 +948,14 @@ class ModuleSSLOpenSSL final { if (!stdalgo::string::equalsci(tag->getString("provider"), "openssl")) { - ServerInstance->Logs.Normal(MODNAME, "Ignoring non-OpenSSL <sslprofile> tag at " + tag->source.str()); + ServerInstance->Logs.Debug(MODNAME, "Ignoring non-OpenSSL <sslprofile> tag at " + tag->source.str()); continue; } std::string name = tag->getString("name"); if (name.empty()) { - ServerInstance->Logs.Normal(MODNAME, "Ignoring <sslprofile> tag without name at " + tag->source.str()); + ServerInstance->Logs.Warning(MODNAME, "Ignoring <sslprofile> tag without name at " + tag->source.str()); continue; } diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index c164014d9..9400f36b7 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -146,12 +146,12 @@ struct CallerIDExtInfo final callerid_data* target = this->Get(user, false); if (!target) { - ServerInstance->Logs.Normal(MODNAME, "ERROR: Inconsistency detected in callerid state, please report (1)"); + ServerInstance->Logs.Debug(MODNAME, "ERROR: Inconsistency detected in callerid state, please report (1)"); continue; // shouldn't happen, but oh well. } if (!stdalgo::vector::swaperase(target->wholistsme, dat)) - ServerInstance->Logs.Normal(MODNAME, "ERROR: Inconsistency detected in callerid state, please report (2)"); + ServerInstance->Logs.Debug(MODNAME, "ERROR: Inconsistency detected in callerid state, please report (2)"); } delete dat; } @@ -322,12 +322,12 @@ public: if (!dat2) { // How the fuck is this possible. - ServerInstance->Logs.Normal(MODNAME, "ERROR: Inconsistency detected in callerid state, please report (3)"); + ServerInstance->Logs.Debug(MODNAME, "ERROR: Inconsistency detected in callerid state, please report (3)"); return false; } if (!stdalgo::vector::swaperase(dat2->wholistsme, dat)) - ServerInstance->Logs.Normal(MODNAME, "ERROR: Inconsistency detected in callerid state, please report (4)"); + ServerInstance->Logs.Debug(MODNAME, "ERROR: Inconsistency detected in callerid state, please report (4)"); user->WriteNotice(whotoremove->nick + " is no longer on your accept list"); return true; @@ -383,7 +383,7 @@ private: { // Find me on their callerid list if (!dat->accepting.erase(who)) - ServerInstance->Logs.Normal(MODNAME, "ERROR: Inconsistency detected in callerid state, please report (5)"); + ServerInstance->Logs.Debug(MODNAME, "ERROR: Inconsistency detected in callerid state, please report (5)"); } userdata->wholistsme.clear(); diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index cfd00ff47..d041ef4ba 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -890,7 +890,7 @@ void ModuleFilter::ReadFilters() if (result.first) removedfilters.erase(pattern); else - ServerInstance->Logs.Normal(MODNAME, "Filter '%s' could not be added: %s", pattern.c_str(), result.second.c_str()); + ServerInstance->Logs.Warning(MODNAME, "Filter '%s' could not be added: %s", pattern.c_str(), result.second.c_str()); } if (!removedfilters.empty()) diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index c2572ab12..0d378e69f 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -77,7 +77,7 @@ static bool WriteDatabase(PermChannel& permchanmode, bool save_listmodes) std::ofstream stream(permchannelsnewconf); if (!stream.is_open()) { - ServerInstance->Logs.Normal(MODNAME, "Cannot create database \"%s\"! %s (%d)", permchannelsnewconf.c_str(), strerror(errno), errno); + ServerInstance->Logs.Error(MODNAME, "Cannot create database \"%s\"! %s (%d)", permchannelsnewconf.c_str(), strerror(errno), errno); ServerInstance->SNO.WriteToSnoMask('a', "database: cannot create new permchan db \"%s\": %s (%d)", permchannelsnewconf.c_str(), strerror(errno), errno); return false; } @@ -149,7 +149,7 @@ static bool WriteDatabase(PermChannel& permchanmode, bool save_listmodes) if (stream.fail()) { - ServerInstance->Logs.Normal(MODNAME, "Cannot write to new database \"%s\"! %s (%d)", permchannelsnewconf.c_str(), strerror(errno), errno); + ServerInstance->Logs.Error(MODNAME, "Cannot write to new database \"%s\"! %s (%d)", permchannelsnewconf.c_str(), strerror(errno), errno); ServerInstance->SNO.WriteToSnoMask('a', "database: cannot write to new permchan db \"%s\": %s (%d)", permchannelsnewconf.c_str(), strerror(errno), errno); return false; } @@ -161,7 +161,7 @@ static bool WriteDatabase(PermChannel& permchanmode, bool save_listmodes) // Use rename to move temporary to new db - this is guaranteed not to fuck up, even in case of a crash. if (rename(permchannelsnewconf.c_str(), permchannelsconf.c_str()) < 0) { - ServerInstance->Logs.Normal(MODNAME, "Cannot replace old database \"%s\" with new database \"%s\"! %s (%d)", permchannelsconf.c_str(), permchannelsnewconf.c_str(), strerror(errno), errno); + ServerInstance->Logs.Error(MODNAME, "Cannot replace old database \"%s\" with new database \"%s\"! %s (%d)", permchannelsconf.c_str(), permchannelsnewconf.c_str(), strerror(errno), errno); ServerInstance->SNO.WriteToSnoMask('a', "database: cannot replace old permchan db \"%s\" with new db \"%s\": %s (%d)", permchannelsconf.c_str(), permchannelsnewconf.c_str(), strerror(errno), errno); return false; } @@ -211,7 +211,7 @@ public: if (!ServerInstance->Channels.IsChannel(channel)) { - ServerInstance->Logs.Normal(MODNAME, "Ignoring permchannels tag with invalid channel name (\"" + channel + "\")"); + ServerInstance->Logs.Warning(MODNAME, "Ignoring permchannels tag with invalid channel name (\"" + channel + "\")"); continue; } @@ -317,7 +317,7 @@ public: } catch (const CoreException& e) { - ServerInstance->Logs.Normal(MODNAME, "Error loading permchannels database: " + std::string(e.GetReason())); + ServerInstance->Logs.Error(MODNAME, "Error loading permchannels database: %s", e.what()); } } } diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index b11894870..ca4decdc2 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -57,7 +57,7 @@ private: if (InspIRCd::Match(server->GetName(), sasl_target)) { - ServerInstance->Logs.Normal(MODNAME, "SASL target server \"%s\" %s", sasl_target.c_str(), (linked ? "came online" : "went offline")); + ServerInstance->Logs.Debug(MODNAME, "SASL target server \"%s\" %s", sasl_target.c_str(), (linked ? "came online" : "went offline")); online = linked; } } @@ -257,7 +257,7 @@ public: else if (msg[2] == "M") this->user->WriteNumeric(RPL_SASLMECHS, msg[3], "are available SASL mechanisms"); else - ServerInstance->Logs.Normal(MODNAME, "Services sent an unknown SASL message \"%s\" \"%s\"", msg[2].c_str(), msg[3].c_str()); + ServerInstance->Logs.Debug(MODNAME, "Services sent an unknown SASL message \"%s\" \"%s\"", msg[2].c_str(), msg[3].c_str()); break; case SASL_DONE: diff --git a/src/modules/m_showfile.cpp b/src/modules/m_showfile.cpp index 3eaae462f..f24d1259d 100644 --- a/src/modules/m_showfile.cpp +++ b/src/modules/m_showfile.cpp @@ -169,7 +169,7 @@ public: } catch (const CoreException& ex) { - ServerInstance->Logs.Normal(MODNAME, "Error: " + ex.GetReason() + " at " + tag->source.str()); + ServerInstance->Logs.Warning(MODNAME, "Error: " + ex.GetReason() + " at " + tag->source.str()); } } diff --git a/src/modules/m_spanningtree/hmac.cpp b/src/modules/m_spanningtree/hmac.cpp index 0023fa7d5..55f58ce08 100644 --- a/src/modules/m_spanningtree/hmac.cpp +++ b/src/modules/m_spanningtree/hmac.cpp @@ -65,7 +65,7 @@ std::string TreeSocket::MakePass(const std::string& password, const std::string& return "AUTH:" + Base64::Encode(sha256->hmac(password, challenge)); if (!challenge.empty() && !sha256) - ServerInstance->Logs.Normal(MODNAME, "Not authenticating to server using SHA256/HMAC because we don't have an SHA256 provider (e.g. the sha2 module) loaded!"); + ServerInstance->Logs.Warning(MODNAME, "Not authenticating to server using HMAC-SHA256 because we don't have an SHA256 provider (e.g. the sha2 module) loaded!"); return password; } diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp index 398cf05be..e9d568010 100644 --- a/src/modules/m_spanningtree/postcommand.cpp +++ b/src/modules/m_spanningtree/postcommand.cpp @@ -60,7 +60,7 @@ void SpanningTreeUtilities::RouteCommand(TreeServer* origin, CommandBase* thiscm sdest = FindRouteTarget(routing.target); if (!sdest) { - ServerInstance->Logs.Normal(MODNAME, "Trying to route %s%s to nonexistent server %s", (encap ? "ENCAP " : ""), command.c_str(), routing.target.c_str()); + ServerInstance->Logs.Debug(MODNAME, "Trying to route %s%s to nonexistent server %s", (encap ? "ENCAP " : ""), command.c_str(), routing.target.c_str()); return; } } diff --git a/src/modules/m_spanningtree/resolvers.cpp b/src/modules/m_spanningtree/resolvers.cpp index fbaa6c21b..98297e49c 100644 --- a/src/modules/m_spanningtree/resolvers.cpp +++ b/src/modules/m_spanningtree/resolvers.cpp @@ -156,7 +156,7 @@ void SecurityIPResolver::OnError(const DNS::Query* r) if (CheckIPv4()) return; - ServerInstance->Logs.Debug(MODNAME, "Could not resolve IP associated with link '%s': %s", + ServerInstance->Logs.Warning(MODNAME, "Could not resolve IP associated with link '%s': %s", link->Name.c_str(), this->manager->GetErrorStr(r->error).c_str()); } diff --git a/src/modules/m_spanningtree/sinfo.cpp b/src/modules/m_spanningtree/sinfo.cpp index ea5257360..f4d46b57b 100644 --- a/src/modules/m_spanningtree/sinfo.cpp +++ b/src/modules/m_spanningtree/sinfo.cpp @@ -35,7 +35,7 @@ CmdResult CommandSInfo::HandleServer(TreeServer* server, CommandBase::Params& pa else if (irc::equals(key, "desc")) { // Only sent when the description of a server changes because of a rehash; not sent on burst - ServerInstance->Logs.Normal(MODNAME, "Server description of " + server->GetName() + " changed: " + value); + ServerInstance->Logs.Debug(MODNAME, "Server description of " + server->GetName() + " changed: " + value); server->SetDesc(value); } else if (irc::equals(key, "rawbranch")) diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp index 98838c3f2..fb6d0b64f 100644 --- a/src/modules/m_spanningtree/treeserver.cpp +++ b/src/modules/m_spanningtree/treeserver.cpp @@ -242,7 +242,7 @@ void TreeServer::CheckService() { if (this->IsRoot()) { - ServerInstance->Logs.Normal(MODNAME, "Servers should not mark themselves as a service (at " + tag->source.str() + ")"); + ServerInstance->Logs.Warning(MODNAME, "Servers should not mark themselves as a service (at " + tag->source.str() + ")"); return; } diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index baceab9e3..d0013fc30 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -205,7 +205,7 @@ void SpanningTreeUtilities::RefreshIPCache() bool isunix = L->IPAddr.find('/') != std::string::npos; if (!L->Port && !isunix) { - ServerInstance->Logs.Normal(MODNAME, "Ignoring a link block without a port."); + ServerInstance->Logs.Warning(MODNAME, "Ignoring a link block without a port."); /* Invalid link block */ continue; } @@ -304,11 +304,11 @@ void SpanningTreeUtilities::ReadConfiguration() if (L->IPAddr.empty()) { L->IPAddr = "*"; - ServerInstance->Logs.Normal(MODNAME, "Configuration warning: Link block '" + L->Name + "' has no IP defined! This will allow any IP to connect as this server, and MAY not be what you want."); + ServerInstance->Logs.Warning(MODNAME, "Configuration warning: Link block '" + L->Name + "' has no IP defined! This will allow any IP to connect as this server, and MAY not be what you want."); } if (!L->Port && L->IPAddr.find('/') == std::string::npos) - ServerInstance->Logs.Normal(MODNAME, "Configuration warning: Link block '" + L->Name + "' has no port defined, you will not be able to /connect it."); + ServerInstance->Logs.Warning(MODNAME, "Configuration warning: Link block '" + L->Name + "' has no port defined, you will not be able to /connect it."); L->Fingerprint.erase(std::remove(L->Fingerprint.begin(), L->Fingerprint.end(), ':'), L->Fingerprint.end()); LinkBlocks.push_back(L); diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp index 8eb295222..38811da0b 100644 --- a/src/modules/m_sqloper.cpp +++ b/src/modules/m_sqloper.cpp @@ -87,7 +87,7 @@ public: auto tblk = ServerInstance->Config->OperTypes.find(type); if (tblk == ServerInstance->Config->OperTypes.end()) { - ServerInstance->Logs.Normal(MODNAME, "Sqloper block " + name + " has missing type " + type); + ServerInstance->Logs.Warning(MODNAME, "Sqloper block " + name + " has missing type " + type); ServerInstance->SNO.WriteGlobalSno('a', "m_sqloper: Oper block %s has missing type %s", name.c_str(), type.c_str()); continue; } @@ -107,7 +107,7 @@ public: void OnError(const SQL::Error& error) override { - ServerInstance->Logs.Normal(MODNAME, "query failed (%s)", error.ToString()); + ServerInstance->Logs.Warning(MODNAME, "query failed (%s)", error.ToString()); ServerInstance->SNO.WriteGlobalSno('a', "m_sqloper: Failed to update blocks from database"); if (!uid.empty()) { @@ -147,7 +147,7 @@ public: } else { - ServerInstance->Logs.Error(MODNAME, "BUG: WHAT?! Why do we have no OPER command?!"); + ServerInstance->Logs.Debug(MODNAME, "BUG: WHAT?! Why do we have no OPER command?!"); } } }; @@ -208,7 +208,7 @@ public: */ return MOD_RES_DENY; } - ServerInstance->Logs.Normal(MODNAME, "database not present"); + ServerInstance->Logs.Warning(MODNAME, "database not present"); } else if (active) { diff --git a/src/modules/m_topiclock.cpp b/src/modules/m_topiclock.cpp index a959f0af2..3b8c6b988 100644 --- a/src/modules/m_topiclock.cpp +++ b/src/modules/m_topiclock.cpp @@ -54,7 +54,7 @@ public: time_t topicts = ConvToNum<time_t>(parameters[1]); if (!topicts) { - ServerInstance->Logs.Normal(MODNAME, "Received SVSTOPIC with a 0 topicts, dropped."); + ServerInstance->Logs.Debug(MODNAME, "Received SVSTOPIC with a 0 topicts, dropped."); return CmdResult::INVALID; } diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp index e673843cd..9c44accba 100644 --- a/src/modules/m_vhost.cpp +++ b/src/modules/m_vhost.cpp @@ -111,7 +111,7 @@ public: const std::string hash = tag->getString("hash", "plaintext", 1); if (stdalgo::string::equalsci(hash, "plaintext")) { - ServerInstance->Logs.Normal(MODNAME, "<vhost> tag for %s at %s contains an plain text password, this is insecure!", + ServerInstance->Logs.Warning(MODNAME, "<vhost> tag for %s at %s contains an plain text password, this is insecure!", username.c_str(), tag->source.str().c_str()); } diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index 41d50b8f4..f134c0473 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -110,7 +110,7 @@ public: std::ofstream stream(xlinenewdbpath); if (!stream.is_open()) { - ServerInstance->Logs.Debug(MODNAME, "Cannot create database \"%s\"! %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno); + ServerInstance->Logs.Error(MODNAME, "Cannot create database \"%s\"! %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno); ServerInstance->SNO.WriteToSnoMask('x', "database: cannot create new xline db \"%s\": %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno); return false; } @@ -148,7 +148,7 @@ public: if (stream.fail()) { - ServerInstance->Logs.Debug(MODNAME, "Cannot write to new database \"%s\"! %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno); + ServerInstance->Logs.Error(MODNAME, "Cannot write to new database \"%s\"! %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno); ServerInstance->SNO.WriteToSnoMask('x', "database: cannot write to new xline db \"%s\": %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno); return false; } @@ -160,7 +160,7 @@ public: // Use rename to move temporary to new db - this is guaranteed not to fuck up, even in case of a crash. if (rename(xlinenewdbpath.c_str(), xlinedbpath.c_str()) < 0) { - ServerInstance->Logs.Debug(MODNAME, "Cannot replace old database \"%s\" with new database \"%s\"! %s (%d)", xlinedbpath.c_str(), xlinenewdbpath.c_str(), strerror(errno), errno); + ServerInstance->Logs.Error(MODNAME, "Cannot replace old database \"%s\" with new database \"%s\"! %s (%d)", xlinedbpath.c_str(), xlinenewdbpath.c_str(), strerror(errno), errno); ServerInstance->SNO.WriteToSnoMask('x', "database: cannot replace old xline db \"%s\" with new db \"%s\": %s (%d)", xlinedbpath.c_str(), xlinenewdbpath.c_str(), strerror(errno), errno); return false; } @@ -178,7 +178,7 @@ public: std::ifstream stream(xlinedbpath); if (!stream.is_open()) { - ServerInstance->Logs.Debug(MODNAME, "Cannot read database \"%s\"! %s (%d)", xlinedbpath.c_str(), strerror(errno), errno); + ServerInstance->Logs.Error(MODNAME, "Cannot read database \"%s\"! %s (%d)", xlinedbpath.c_str(), strerror(errno), errno); ServerInstance->SNO.WriteToSnoMask('x', "database: cannot read xline db \"%s\": %s (%d)", xlinedbpath.c_str(), strerror(errno), errno); return false; } @@ -205,7 +205,7 @@ public: if (command_p[1] != "1") { stream.close(); - ServerInstance->Logs.Debug(MODNAME, "I got database version %s - I don't understand it", command_p[1].c_str()); + ServerInstance->Logs.Error(MODNAME, "I got database version %s - I don't understand it", command_p[1].c_str()); ServerInstance->SNO.WriteToSnoMask('x', "database: I got a database version (%s) I don't understand", command_p[1].c_str()); return false; } diff --git a/src/socket.cpp b/src/socket.cpp index 0f2905cfd..77c8d1edc 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -40,7 +40,7 @@ bool InspIRCd::BindPort(std::shared_ptr<ConfigTag> tag, const irc::sockets::sock if ((**n).bind_sa == sa) { // Replace tag, we know addr and port match, but other info (type, ssl) may not. - ServerInstance->Logs.Normal("SOCKET", "Replacing listener on %s from old tag at %s with new tag from %s", + ServerInstance->Logs.Debug("SOCKET", "Replacing listener on %s from old tag at %s with new tag from %s", sa.str().c_str(), (*n)->bind_tag->source.str().c_str(), tag->source.str().c_str()); (*n)->bind_tag = tag; (*n)->ResetIOHookProvider(); @@ -59,7 +59,7 @@ bool InspIRCd::BindPort(std::shared_ptr<ConfigTag> tag, const irc::sockets::sock return false; } - ServerInstance->Logs.Normal("SOCKET", "Added a listener on %s from tag at %s", sa.str().c_str(), tag->source.str().c_str()); + ServerInstance->Logs.Debug("SOCKET", "Added a listener on %s from tag at %s", sa.str().c_str(), tag->source.str().c_str()); ports.push_back(ll); return true; } @@ -78,11 +78,11 @@ size_t InspIRCd::BindPorts(FailedPortList& failed_ports) { // InspIRCd supports IPv4 and IPv6 natively; no 4in6 required. if (strncasecmp(address.c_str(), "::ffff:", 7) == 0) - this->Logs.Normal("SOCKET", "Using 4in6 (::ffff:) isn't recommended. You should bind IPv4 addresses directly instead."); + this->Logs.Warning("SOCKET", "Using 4in6 (::ffff:) isn't recommended. You should bind IPv4 addresses directly instead."); // A TCP listener with no ports is not very useful. if (portlist.empty()) - this->Logs.Normal("SOCKET", "TCP listener on %s at %s has no ports specified!", + this->Logs.Warning("SOCKET", "TCP listener on %s at %s has no ports specified!", address.empty() ? "*" : address.c_str(), tag->source.str().c_str()); irc::portparser portrange(portlist, false); @@ -111,7 +111,7 @@ size_t InspIRCd::BindPorts(FailedPortList& failed_ports) irc::sockets::sockaddrs bindspec; if (fullpath.length() > std::min(ServerInstance->Config->Limits.MaxHost, sizeof(bindspec.un.sun_path) - 1)) { - this->Logs.Normal("SOCKET", "UNIX listener on %s at %s specified a path that is too long!", + this->Logs.Warning("SOCKET", "UNIX listener on %s at %s specified a path that is too long!", fullpath.c_str(), tag->source.str().c_str()); continue; } @@ -119,7 +119,7 @@ size_t InspIRCd::BindPorts(FailedPortList& failed_ports) // Check for characters which are problematic in the IRC message format. if (fullpath.find_first_of("\n\r\t!@: ") != std::string::npos) { - this->Logs.Normal("SOCKET", "UNIX listener on %s at %s specified a path containing invalid characters!", + this->Logs.Warning("SOCKET", "UNIX listener on %s at %s specified a path containing invalid characters!", fullpath.c_str(), tag->source.str().c_str()); continue; } @@ -139,11 +139,11 @@ size_t InspIRCd::BindPorts(FailedPortList& failed_ports) n++; if (n == ports.end()) { - this->Logs.Normal("SOCKET", "Port bindings slipped out of vector, aborting close!"); + this->Logs.Warning("SOCKET", "Port bindings slipped out of vector, aborting close!"); break; } - this->Logs.Normal("SOCKET", "Port binding %s was removed from the config file, closing.", + this->Logs.Debug("SOCKET", "Port binding %s was removed from the config file, closing.", (**n).bind_sa.str().c_str()); delete *n; diff --git a/src/socketengines/kqueue.cpp b/src/socketengines/kqueue.cpp index bfef2a91a..106045d01 100644 --- a/src/socketengines/kqueue.cpp +++ b/src/socketengines/kqueue.cpp @@ -121,7 +121,7 @@ void SocketEngine::DelFd(EventHandler* eh) int fd = eh->GetFd(); if (!eh->HasFd()) { - ServerInstance->Logs.Normal("SOCKET", "DelFd() on invalid fd: %d", fd); + ServerInstance->Logs.Debug("SOCKET", "DelFd() on invalid fd: %d", fd); return; } diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 54e3041d7..ea8069041 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -150,7 +150,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs continue; const char* hooktype = i == via->iohookprovs.begin() ? "hook" : "sslprofile"; - ServerInstance->Logs.Normal("USERS", "Non-existent I/O hook '%s' in <bind:%s> tag at %s", + ServerInstance->Logs.Warning("USERS", "Non-existent I/O hook '%s' in <bind:%s> tag at %s", iohookprovref.GetProvider().c_str(), hooktype, via->bind_tag->source.str().c_str()); this->QuitUser(New, InspIRCd::Format("Internal error handling connection (misconfigured %s)", hooktype)); return; @@ -235,13 +235,13 @@ void UserManager::QuitUser(User* user, const std::string& quitmessage, const std { if (user->quitting) { - ServerInstance->Logs.Normal("USERS", "ERROR: Tried to quit quitting user: " + user->nick); + ServerInstance->Logs.Debug("USERS", "ERROR: Tried to quit quitting user: " + user->nick); return; } if (IS_SERVER(user)) { - ServerInstance->Logs.Normal("USERS", "ERROR: Tried to quit server user: " + user->nick); + ServerInstance->Logs.Debug("USERS", "ERROR: Tried to quit server user: " + user->nick); return; } @@ -300,7 +300,7 @@ void UserManager::QuitUser(User* user, const std::string& quitmessage, const std } if (!clientlist.erase(user->nick)) - ServerInstance->Logs.Normal("USERS", "ERROR: Nick not found in clientlist, cannot remove: " + user->nick); + ServerInstance->Logs.Debug("USERS", "ERROR: Nick not found in clientlist, cannot remove: " + user->nick); uuidlist.erase(user->uuid); user->PurgeEmptyChannels(); diff --git a/src/users.cpp b/src/users.cpp index db32a681d..1e95d3310 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -546,7 +546,7 @@ bool User::ChangeNick(const std::string& newnick, time_t newts) { if (quitting) { - ServerInstance->Logs.Normal("USERS", "ERROR: Attempted to change nick of a quitting user: " + this->nick); + ServerInstance->Logs.Debug("USERS", "ERROR: Attempted to change nick of a quitting user: " + this->nick); return false; } |
