Update net_services.c

pull/276/head
sfeakes 2024-04-16 09:44:27 -05:00 committed by GitHub
parent 6e5d4be956
commit 8fbdabeb54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

View File

@ -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;