Logging configuration - CustomerID

Ubisecure CustomerID has two log files. The log files are:

  • customerid_audit.log – This log file contains the audit log.
  • customerid_diag.log – This log file contains additional technical information, such as errors.

These log files are by default written to the following location inside the WildFly installation: standalone/log/. If you use the default configuration both log files will be renamed every day there is activity in the system. The date will be added to the end of the log file names in the following format: yyyy-mm-dd. You can also set up your own logging configuration and for example collect all logs to a separate logging server.

Ubisecure CustomerID logging behaviour is configured via WildFly. Please see instructions from WildFly documentation. The default log settings generated to the standalone.xml file look like this:

<subsystem xmlns="urn:jboss:domain:logging:3.0">
...
	<periodic-rotating-file-handler name="CID_AUDIT_LOG_FILE_HANDLER" autoflush="true">
		<level name="INFO"/>
		<formatter>
			<named-formatter name="AUDIT-PATTERN"/>
		</formatter>
		<file relative-to="jboss.server.log.dir" path="customerid_audit.log"/>
		<suffix value=".yyyy-MM-dd"/>
		<append value="true"/>
	</periodic-rotating-file-handler>
	<periodic-rotating-file-handler name="CID_DIAG_LOG_FILE_HANDLER" autoflush="true">
		<level name="INFO"/>
		<formatter>
			<named-formatter name="PATTERN"/>
		</formatter>
		<file relative-to="jboss.server.log.dir" path="customerid_diag.log"/>
		<suffix value=".yyyy-MM-dd"/>
		<append value="true"/>
	</periodic-rotating-file-handler>
...
	<logger category="com.ubisecure.customerid.log.audit" use-parent-handlers="false">
		<level name="INFO"/>
		<handlers>
			<handler name="CID_AUDIT_LOG_FILE_HANDLER"/>
		</handlers>
	</logger>
	<logger category="com.ubisecure" use-parent-handlers="false">
		<level name="INFO"/>
		<handlers>
			<handler name="CID_DIAG_LOG_FILE_HANDLER"/>
		</handlers>
	</logger>
	<logger category="org.apache.wicket">
		<level name="INFO"/>
	</logger>
...
	<formatter name="PATTERN">
		<pattern-formatter pattern="%d;%-5p;node1;%t;%c;%s;%E%n"/>
	</formatter>
	<formatter name="AUDIT-PATTERN">
		<pattern-formatter pattern="%d;%s%n"/>
	</formatter>
...
</subsystem> 


If you want to change the log level just edit the value of the name attribute in the level element inside com.ubisecure logger definition (line 29). When using DEBUG level you need to set this level also to the CID_DIAG_LOG_FILE_HANDLER itself (line 13).

Note that DEBUG level produces a lot of information for debugging purposes. You need to monitor your file system usage when using the DEBUG value as the log files might become very big. INFO value should be used in production.

Instead of editing this file directly you should consider using JBoss CLI tool.

./bin/jboss_cli.sh --connect

[standalone@localhost:9990 /] /subsystem=logging/logger=com.ubisecure:read-attribute(name="level")
{
    "outcome" => "success",
    "result" => "INFO"
}

[standalone@localhost:9990 /] /subsystem=logging/logger=com.ubisecure:write-attribute(name="level", value="DEBUG")
{"outcome" => "success"}

[standalone@localhost:9990 /] /subsystem=logging/logger=com.ubisecure:read-attribute(name="level")
{
    "outcome" => "success",
    "result" => "DEBUG"
}

[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=CID_DIAG_LOG_FILE_HANDLER:write-attribute(name="level", value="DEBUG")
{"outcome" => "success"}

[standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=CID_DIAG_LOG_FILE_HANDLER:read-attribute(name="level")
{
    "outcome" => "success",
    "result" => "DEBUG"
}