Logging - Production System
Production System logs information during its operation. By default, the log file is saved in the current user's log directory (on Windows, this is C:\Users\<user>\AppData\Roaming\STR\SuperSERVER SA\logs).
You can configure the settings for logging by modifying log4j.sa2ps.properties, which is located in the SuperSERVER program data directory (by default, C:\ProgramData\STR\SuperSERVER SA).
Logging Levels
Logging is provided by the Apache component Log4j, which has six levels of logging. These levels are (listed in order, from most verbose to least verbose):
TRACE | Most verbose. All possible messages are written to the logs. |
---|---|
DEBUG | Logs everything except TRACE messages. |
INFO | This is the default setting. Recommended for production use. Logs INFO , WARN , ERROR and FATAL messages. |
WARN | Logs only WARN , ERROR and FATAL messages. |
ERROR | Logs only ERROR and FATAL messages. |
FATAL | Least verbose. Only FATAL errors are logged. |
Increase or Decrease the Amount of Information Logged
By default, Production System is configured to log at the INFO
level. This means that all INFO
, WARN
, ERROR
, and FATAL
messages are logged.
You can change this by editing the following line:
log4j.rootLogger=INFO,BlRollingFile, CONSOLE
For example, to change to the DEBUG
level, you could change this to:
log4j.rootLogger=DEBUG,BlRollingFile, CONSOLE
This will configure Production System to log DEBUG
messages, in addition to INFO
, WARN
, ERROR
, and FATAL
messages.
Change the Log File Location
By default the Production System log file is written to the current user's log directory. You can change the location of the log output by removing the comment from the start of the following line and setting the value to the location you want to generate the log file:
#log4j.appender.BlRollingFile.File=./logs/sa2ps.log.txt
You can either use a relative path or an absolute path. For example:
The following setting configures the log file location to be a directory called logs within the current directory (this is relative to the current directory from which you ran Production System).
BASHlog4j.appender.BlRollingFile.File=./logs/sa2ps.log.txt
The following setting configures an absolute file path for the log file.
BASHlog4j.appender.BlRollingFile.File=E:/Production System/logs2/sa2ps.log.txt
Learn More
Other SuperSTAR components have their own individual logging settings. For more information, see:
- Logging - SuperADMIN
- Logging - SuperSERVER
- Logging - Metadata Server
- Logging - SuperWEB2
- Logging - Job Queue Manager
- Logging - User Data Repository
In addition, SuperSTAR has an optional Audit Logging component that can be used to track user activity.
For more information about Log4j, refer to the Apache documentation: http://logging.apache.org/log4j/1.2/manual.html.