From 8fbdabeb54b9fd20abbbc11ca2e6dd7d686ec93a Mon Sep 17 00:00:00 2001 From: sfeakes Date: Tue, 16 Apr 2024 09:44:27 -0500 Subject: [PATCH] Update net_services.c --- net_services.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/net_services.c b/net_services.c index 7d718aa..d071ee1 100644 --- a/net_services.c +++ b/net_services.c @@ -159,11 +159,13 @@ sd_journal *open_journal() { sd_journal *journal; char filter[51]; +#ifndef AQ_CONTAINER // Below works for local - //if (sd_journal_open(&journal, SD_JOURNAL_LOCAL_ONLY) < 0) - // Desting Docker install - //if (sd_journal_open(&journal, SD_JOURNAL_ALL_NAMESPACES || SD_JOURNAL_SYSTEM) < 0) + if (sd_journal_open(&journal, SD_JOURNAL_LOCAL_ONLY) < 0) +#else + // Container doesn't have local systemd_journal so use hosts through mapped filesystem if (sd_journal_open_directory(&journal, "/var/log/journal", SD_JOURNAL_SYSTEM) < 0) +#endif { LOGSystemError(errno, NET_LOG, "Failed to open journal"); return journal;