Targeted Logging
By specifying a package in the logger name, you can isolate log messages by its functionality.
Sample
<appender name="TRACE_FILE" class="ch.qos.log4j2.core.FileAppender">
<file>Session_TRACE_LEVEL.log</file>
<encoder>
<pattern>%d{MM-dd-yyyy HH:mm:ss.SSS 'GMT'Z} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<logger name="ingrian.internal.session.Session" level="TRACE" additivity="false">
<appender-ref ref="TRACE_FILE" />
</logger>