Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 its activity and errors and it is possible to modify the Log4J properties if needed. The configuration is stored at in the file <XpoLog-Config>/conf/general/log4jXpolog.properties file, 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 <XpoLogfile <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 log, 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.

Code Block
#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.

Code Block
#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 the cluster) may reach approximately 1GB

    on

    at full capacity.