Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: revert logback updates

Statistics log is the same as the audit log, except the personal identifying user principal information is not shown.

...

To enable Statistics Log please edit the configuration file (logback.xml replacing log4j.properties since SSO 9.0)

Configuring via

...

The logback.xml file is located in ubilogin customization directory (ubilogin-sso/ubilogin/custom/logging/logback.xml) and contains the configuration of all SSO logging. Learn about Logback configuration file syntax.

To enable Statistics Log please add statistics=<level> to the turboFilter configuration, e.g. for level INFO it should looks like:

Code Block
themeDefault
<configuration>
    <turboFilter class="com.ubisecure.common.logging.MarkerBasedLogFilter">
        <DefaultLevels>audit=info;tech=info;diag.*=info;statistics=info</DefaultLevels>
    </turboFilter>
...
</configuration>

This way, all entries for the statistics marker will automatically be added to the logs if any appender includes the marker, e.g. for the uas_statistics log file:

Code Block
themeDefault
<configuration>
...
    <appender name="STATISTICS_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
            <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
                <marker>statistics</marker>
            </evaluator>
            <onMismatch>DENY</onMismatch>
            <onMatch>NEUTRAL</onMatch>
        </filter>
        <encoder>
            <pattern>${AUDIT_FILE_LOG_PATTERN}</pattern>
        </encoder>
        <!-- >file>${UAS_LOG_FILE}_statistics.log</file-->
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${UAS_LOG_FILE}_statistics.%d{yyyy-MM-dd}.log</fileNamePattern>
...
        </rollingPolicy>
    </appender>
...
</configuration>

More examples of Logback configuration can be found in Diag log description section. 

...

log4j.properties file

...

To enable Statistics Log please edit the following file with a text editor:

...