How to configure the logs of Squash TA

The logs of Squash TA must be configured using Maven.

First, you need to open the file that contains the configuration, which is : %squashTAToolBox%/apache-maven-3.5.0/conf/logger/log4j2.xml

The value in the XML tag <Property> determines the log level.

The table below illustrates how Level filtering works. In the table, the vertical header shows the Level of the LogEvent, while the horizontal header shows the Level associated with the appropriate LoggerConfig. The intersection identifies whether the LogEvent would be allowed to pass for further processing (Yes) or discarded (No).

Source: https://logging.apache.org/log4j/2.0/manual/architecture.html

After the general configuration, you can add filters to increase the precision of LogEvent.

For example, you can add in the tag XML <Loggers> to increase the log level:

<logger name="[USER_MESSAGE]" level="DEBUG"/>

This line will write all the logs except TRACE with the logger [USER_MESSAGE]

Thus, if you want to log details about ssh connections you can add in the XML tag <Loggers>

<logger name="net.schmizz.sshj" level="TRACE"/>

Be careful. It is not secure to let this information in the logs in production.