NXLog fail to start on macOS

View thread



I'm using NXLog 5.6.7727 version for Apple Silicon

When I start the service as root manually with the CLI /opt/nxlog/bin/nxlog -f the service works and my logs are sent.

The same settings started with launchd works but don't send anything.

Any ideas why?

Here is my current configuration:

User nxlog
Group nxlog
Panic Soft

# default values:
define INSTALLDIR /opt/nxlog
PidFile %INSTALLDIR%/var/run/nxlog/nxlog.pid
CacheDir %INSTALLDIR%/var/spool/nxlog
ModuleDir %INSTALLDIR%/libexec/nxlog/modules
SpoolDir %INSTALLDIR%/var/spool/nxlog

define CERTDIR %INSTALLDIR%/var/lib/nxlog/cert
define CONFDIR %INSTALLDIR%/etc/nxlog.d

# Note that these two lines define constants only; the log file location
# is ultimately set by the `LogFile` directive (see below). The
# `MYLOGFILE` define is also used to rotate the log file automatically
# (see the `_fileop` block).
define LOGDIR %INSTALLDIR%/var/log/nxlog
define MYLOGFILE %LOGDIR%/nxlog.log

<Extension _json>
    Module xm_json

<Extension gelf>
    Module        xm_gelf

<Input macos_es>
    Module              im_maces
    NotifyEvents    All
        $Hostname = hostname();

<Input macos_uls>
    Module              im_maculs
    UUIDTextPath        "/var/db/uuidtext"
        if $subsystem == 'com.apple.SkyLight'
        $Hostname = hostname();

<Output graylog>
    Module        om_tcp
    OutputType    GELF_TCP

<Route Mac2Graylog>
    Path        macos_uls, macos_es => graylog