I have a Perl application developed with Calango.
I push logs to a local agent running at 514 with Sys::Syslog
I use the following lines
openlog($self->program_name,"pid", LOG_USER)
setlogsock('udp');
syslog(LOG_INFO, $message)
closelog;
To send all logs to another location,
openlog($self->program_name,"pid", LOG_USER)
setlogsock('udp');
syslog(LOG_INFO, $message)
closelog;
openlog($self->program_name,"pid", LOG_USER)
setlogsock({type=>'udp',port=>1514});
syslog(LOG_INFO, $message)
closelog;
When this is done in the context of an HTTP request, I see most logs in the exporter serving at 1514
I am inclined to set the port in the first setlogsock, but concerned about the thread safety. It’s already broken, but not ready to take to prod and break it again.
Could the issue be because perhaps the setlogsock changes the port, host etc globally?