Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

XpoLog system logs are located under the 'log' directory in the XpoLog allocated storage (by default under the installation directory). XpoLog uses Log4J to log it's activity and errors and it is possible to modify the Log4J properties if needed. The configuration is stored at the file <XpoLog-Config>/conf/general/log4jXpolog.properties but since it is the default one it should not be changed since it will be overridden on system updates.
If you wish to customize the default configuration, you may copy the file <XpoLog-Config>/conf/general/log4jXpolog.properties and create a new file named <XpoLog-Config>/conf/general/log4jXpolog.user.properties (if this file exists, it will be used before the default one).

In general, XpoLog uses the default Apache Log4J configuration syntax. There is an appender definition for each of the system logs which defines its pattern, rotation policy, number of files to keep, etc.
For this example, we'll use the configuration of XpoLog Application log (xpologlog.log*):

Default Configuration:

This configuration rotates a file every 5000K and keeps 10 files in total based on the pattern specified.

#Appender data for xpolog
log4j.appender.xpolog=org.apache.log4j.RollingFileAppender
log4j.appender.xpolog.File=${xpolog.root.path}log/${xpolog.machine.name.path}xpologlog.log
log4j.appender.xpolog.MaxFileSize=5000KB
log4j.appender.xpolog.MaxBackupIndex=10
log4j.appender.xpolog.layout=org.apache.log4j.PatternLayout
log4j.appender.xpolog.layout.ConversionPattern=[%d] [%t] [%p] [%c] [%l] %m%n


Modified Configuration:
If the below replaces the default configuration, then XpoLog will keep a daily file (unlimited by size) for 30 days based on the pattern specified.

#Appender data for xpolog
log4j.appender.xpolog=xpolog.eye.util.logging.DateFormatFileAppender
log4j.appender.xpolog.File=${xpolog.root.path}log/${xpolog.machine.name.path}xpologlog.log
log4j.appender.xpolog.DatePattern=yyyy-MM-dd
log4j.appender.xpolog.MaxFilesToKeep=30
log4j.appender.xpolog.layout=org.apache.log4j.PatternLayout
log4j.appender.xpolog.layout.ConversionPattern=[%d] [%t] [%p] [%c] [%l] %m%n

 

Note: 

  • Changing the Log4J configuration requires all XpoLog cluster nodes to be restarted.
  • Upon changing the default logging settings the view of XpoLog logs via XpoLog support portal may not work, the logs may be defined in XpoLog using their modified configuration.
  • Make sure you take into consideration the required disk space when changing the default settings. By default XpoLog log directory (per instance in cluster) may reach approximately 1GB on full capacity.
  • No labels