A2 Configure Autoenrollment Server for Syslog
Autoenrollment Server can use syslog as logging output by using the Autoenrollment Configuration Log Properties settings. Change the contents of the logger.properties file or change the target property file path to enable logging to syslog. See Set the Autoenrollment Configuration utility on how to configure this.
The sample syslog properties file can be found as syslogger_sample.properties in the installation directory of the Autoenrollment Server. The following shows the contents of the sample:
# A line starting with # is a comment and ignored.
# Define with log-level (DEBUG, INFO, WARN, or ERROR) and appender name
log4cpp.rootCategory=INFO, SYSLOG
# Configured appender type
log4cpp.appender.SYSLOG=SyslogAppender
# Remote syslog server IP address
log4cpp.appender.SYSLOG.syslogHost=192.168.1.1
# Remote syslog server port number
log4cpp.appender.SYSLOG.portNumber=514
# Syslog facility number
log4cpp.appender.SYSLOG.facility=1
# Output pattern (see http://log4cpp.sourceforge.net/#faq for format details)
log4cpp.appender.SYSLOG.layout=PatternLayout
log4cpp.appender.SYSLOG.layout.ConversionPattern=[AESRV]: %d{%Y-%m-%d %H:%M:%S} %-5p [%t] %m%n
Property key | Description |
---|---|
log4cpp.rootCategory | Sets logger_name as SYSLOG by default. See Table Log property details for a more detailed description of this property. |
log4cpp.appender.<logger_name> | The value must be SyslogAppender to use for Syslog. See Table Log property details for a more detailed description of this property. |
log4cpp.appender.<logger_name>.syslogHost | Specifies the remote Syslog server IP address. NotaThe remote Syslog server must be accessible from the machine where Autoenrollment Server is installed. |
log4cpp.appender.<logger_name>.portNumber | Specifies the remote Syslog server port number. |
log4cpp.appender.<logger_name>.facility | Specifies the remote Syslog server facility number. Default value is 1 (user-level messages). |
log4cpp.appender.<logger_name>.layout | See Table Log property details for a more detailed description of this property. |
log4cpp.appender.<logger_name>.ConversionPattern | The default log format is set as “[AESRV]: <Date{yyyy-mm-dd}> <Time{hh:mm:ss}> <LogLevel> [<TheadID>] <LogMessage>”. Every log message is intentionally prepended with [AESRV]: string, to differentiate Autoenrollment server logs from other logs. The following shows an example: [AESRV]: 2021-09-22 04:15:28 INFO [6176] Service started, waiting for requests. See Table Log property details for a more detailed description of this property. |