syslog-handler doesn't work

205 views
Skip to first unread message

dafi

unread,
Mar 2, 2023, 6:48:17 AM3/2/23
to WildFly
I added to my standalone.xml the syslog-handler configured inside a logging-profile but no log messages is visible inside the file /var/log/messages

The logging-profile has other handled configured (console and file) and these works fine
Obvioulsy the syslog is added inside the root-logger/handlers

I don't understand what I'm missing, may you help me?

Below the full definition of my logging-profile relative to wildfly-26.0.1.Final

<logging-profile name="dafi-app-profile">
<console-handler name="CONSOLE">
<level name="INFO"/>
<formatter>
<named-formatter name="COLOR-PATTERN"/>
</formatter>
</console-handler>
<periodic-rotating-file-handler autoflush="true" name="FILE">
<formatter>
<named-formatter name="PATTERN"/>
</formatter>
<file path="dafi/dafi.log" relative-to="jboss.server.log.dir"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>

<!-- ================================ -->
<!-- Here the syslog definition -->
<!-- ================================ -->
<syslog-handler name="SYSLOG">
<app-name value="dafi-application"/>
</syslog-handler>
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
<logger category="org.jboss.as.config">
<level name="DEBUG"/>
</logger>
<logger category="sun.rmi">
<level name="WARN"/>
</logger>
<root-logger>
<level name="INFO"/>
<handlers>
<handler name="CONSOLE"/>
<handler name="FILE"/>

<!-- ================================ -->
<!-- here we add syslog to root-logger -->
<!-- ================================ -->
<handler name="SYSLOG"/>
</handlers>
</root-logger>
<formatter name="PATTERN">
<pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
</formatter>
<formatter name="COLOR-PATTERN">
<pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
</formatter>
</logging-profile>


The app inside the MANIFEST.MF contains the line

Logging-Profile: dafi-app-profile

James Perkins

unread,
Mar 2, 2023, 4:56:46 PM3/2/23
to WildFly
Are you seeing logs in the dafi.log?

dafi

unread,
Mar 3, 2023, 12:23:41 AM3/3/23
to WildFly
The dafi.log file contains the application log printed from my own code but nothing related to errors relative to syslog so it's impossible to understand if some problem occurs from syslog handler

James Perkins

unread,
Mar 3, 2023, 10:30:28 AM3/3/23
to WildFly
Is your syslogd listening on port 514 with UDP? Or maybe it expects a different format. The default is RFC5424 and maybe it expects the older RFC3164 format. These are just some thoughts.

dafi

unread,
Mar 5, 2023, 2:42:39 AM3/5/23
to WildFly
My admin told be the server is listening to UDP/514 but running the command "sudo netstat -pnltu" I discovered this is false
Finally him configured the server and now everything works fine

without your suggestion I never would have thought to check the server config, thanks!
Reply all
Reply to author
Forward
0 new messages