Configure a Snaplex node

Configure a Snaplex node to use custom logging

During custom Snap development, it can be helpful to change the log levels to obtain more runtime information. Most configuration changes related to log settings can be done through the Updating Snaplex screen in Admin Manager. If the log level for certain libraries needs to be changed, use 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.

To configure a Snaplex node, perform the following steps:

  1. Copy the configuration file to a location outside of the etc directory:
    cp /opt/snaplogic/etc/log4j2-jcc.xml.sample /opt/snaplogic/log4j2-jcc.xml
  2. To enable the custom logging configuration, add a configuration property in the global properties (or in the .slpropz configuration file from the Snaplex properties file):
    jcc.jvm_options = -Dlog4j.configurationFile=/opt/snaplogic/log4j2-jcc.xml
  3. Apply the changes in the configuration file. For example, to disable logging for a Parquet library, add the following:
    <Logger name="org.apache.parquet" level="error" includeLocation="true" additivity="false">   
                             <AppenderRef ref="JCCMAINJSON"/>   
                             <AppenderRef ref="JCCERRORJSON"/> 
                             </Logger>
                        

    You can make further logging configuration changes per your requirements.

  4. Apply these changes to all the nodes in the Snaplex, and restart the Java Component Container (JCC) processes.

When the JCC starts up, the .sample files are written to the new location (these files are copies of what is packaged with the JCC). The -Dlog4j.configurationFile option is passed by the SL monitor to the JCC on startup and specifies the location of the configuration file. By default, the file packaged with the JCC is used.

Note: Security policies prohibit reading logger property files from certain directory locations, such as the /opt/snaplogic/etc and /opt/snaplogic/run folders.