Can someone recommend a good unix syslog * client * library for java?

java.util.logging.Logger seems to implement "syslog-like" logging, where I want the logs to actually use local syslog logging services (so administrators have a easier life, they don’t need to do additional rotation logging, etc. .).

Anyone have any recommendations? I saw that log4j ( http://logging.apache.org/log4j/1.2 ) claimed that they have syslog support, but the API it provides is no different from syslog (8).

Thanks in advance,

+3
source share
1 answer

Log4j can do it

http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/net/SyslogAppender.html

http://wiki.apache.org/logging-log4j/syslog

private static Logger logger = Logger.getLogger( MyClass.class );

...

logger.warn( "This is a warning!" );

log4j.properties syslog

+5

Source: https://habr.com/ru/post/1760142/


All Articles