Class SyslogHandler
- java.lang.Object
-
- java.util.logging.Handler
-
- org.forgerock.openam.log.handlers.syslog.SyslogHandler
-
public class SyslogHandler extends Handler
The SyslogHandler publishes log records using default formatter (SyslogFormatter) and sends these to a syslog daemon using SyslogPublisher. The publisher is initialized once, during initialization of SyslogHandler object and flushed after each write.
-
-
Constructor Summary
Constructors Constructor Description SyslogHandler(String name)Initialize SyslogHandler for logger "name".
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Flushes the buffered logrecords and closes the connections established bySyslogPublisher.voidflush()Flushes the buffered logrecords.voidpublish(LogRecord logRecord)Publishes the log record if it is loggable according to current configuration.-
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
-
-
-
-
Constructor Detail
-
SyslogHandler
public SyslogHandler(String name)
Initialize SyslogHandler for logger "name".- Parameters:
name- is ignored.
-
-
Method Detail
-
close
public void close()
Flushes the buffered logrecords and closes the connections established bySyslogPublisher.
-
publish
public void publish(LogRecord logRecord)
Publishes the log record if it is loggable according to current configuration.
-
-