Developing custom Snaps might require changing the built-in logging configuration of the Snaplex node. Most configuration changes related to Log settings (such as the retention level or file size) can be done through the Update Snaplex properties dialog in SnapLogic Manager. If the log level for certain libraries needs to be changed, use these instructions the following procedure to customize the logging configuration.
Note | ||
---|---|---|
| ||
SnapLogic does not recommend changing the log file names or locations. Doing so can break the functionality that allows the viewing of logs from the SnapLogic Dashboard. |
Steps
Copy the configuration file to a location outside of the
etc
directory:Paste code macro cp /opt/snaplogic/etc/log4j2-jcc.xml.sample /opt/snaplogic/log4j2-jcc.xml
Add To enable the custom logging configuration, add a configuration property in the
global.properties
file (or in the.slpropz
configuration file from the Snaplex properties file):Paste code macro jcc.jvm_options = -Dlog4j.configurationFile=/opt/snaplogic/log4j2-jcc.xml
Apply configuration changes the changes in the configuration file. For example, to disable logging for a Parquet library, add the following:
Paste code macro <Logger name="org.apache.parquet" level="error" includeLocation="true" additivity="false"> <AppenderRef ref="JCCMAINJSON"/> <AppenderRef ref="JCCERRORJSON"/> </Logger>
You can make further configuration options per changes per your requirements.
Apply these changes to all the nodes in the Snaplex, then and restart the Java Component Container (JCC) processes.
...