I have a C program with a syslog command like this:
syslog(LOG_INFO, "slurmctrld: initializing resources");
It outputs the first line below in the syslog. This C code executes a golang binary that also does syslog commands:
Syslogger, err = syslog.New(syslog.LOG_INFO, "slurmctld")
....
Syslogger.Info("slurmctld: initializing resources - completed")
The golang code writes the last 3 entries in the syslog, but they include a PID or thread id:
Apr 16 19:18:37 slurmctld slurmctld: slurmctrld: initializing resources
Apr 16 19:19:12 slurmctld slurmctld[24785]: slurmctrld: creating resource group
Apr 16 19:19:15 slurmctld slurmctld[24785]: slurmctrld: creating machines
Apr 16 19:20:28 slurmctld slurmctld[24785]: slurmctld: initializing resources - completed
In golang is there a way to get syslog messages without the PID so they look the same as from C code?