From fbfd70a35a4b66369b7c4de83a7fe40da3cefcdc Mon Sep 17 00:00:00 2001 From: Thomas Winget Date: Tue, 17 Jan 2023 17:04:53 -0500 Subject: [PATCH] Fix incorrect usage of oxen-logging syslog Previously oxen-logging was erroneously hard-coded to use the target "lokinet" for system logs. Obviously this is wrong for anything else which uses oxen-logging and the system log. This changes our call to add_sink to pass "lokinet" as the target rather than the config filename, and updates oxen-logging to use that argument correctly. --- external/oxen-logging | 2 +- llarp/router/router.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/external/oxen-logging b/external/oxen-logging index 9f2323a2d..12c17d6ea 160000 --- a/external/oxen-logging +++ b/external/oxen-logging @@ -1 +1 @@ -Subproject commit 9f2323a2db5fc54fe8394892769eff859967f735 +Subproject commit 12c17d6eab754908cd88f05d09b9388381e47515 diff --git a/llarp/router/router.cpp b/llarp/router/router.cpp index f3a807edd..55997f3ec 100644 --- a/llarp/router/router.cpp +++ b/llarp/router/router.cpp @@ -411,7 +411,7 @@ namespace llarp if (log::get_level_default() != log::Level::off) log::reset_level(conf.logging.m_logLevel); log::clear_sinks(); - log::add_sink(log_type, conf.logging.m_logFile); + log::add_sink(log_type, log_type == log::Type::System ? "lokinet" : conf.logging.m_logFile); enableRPCServer = conf.api.m_enableRPCServer;