Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
languagetext
WAR 1.x
CATALINA_HOME\webapps\<dashboard>\logs

WAR ≥ 2.x
CATALINA_HOME\webapps\<dashboard>\WEB-INF\classes\logs

ZIP ≥ 2.x
<unpacked_zip>\configurations\logs

Logs are provided in two different formats:

Log files
Description
Notes

restapi.log

restapi.html

Records all web service interaction (errors, warnings etc.)


Info
Note that the *.html log files will not be used in the default "out of the box" configuration. If you would like to have log messages sent to the *.html files as well as the *.log files, please see Enabling log output to *.html files.


restapi.perf.log

restapi.perf.html

Records performance information about user interaction.

Not generated in CAST Dashboard ≥ 2.x.

restapi.audit.log

Records successful user logins, failed logins, logouts, web application startup/stop. This log is not active by default.



Info
See Enabling and configuring the Audit Trail mode section below for more information about this.


...

Code Block
languagetext
WAR 1.x
CATALINA_HOME\webapps\<dashboard>\WEB-INF\log4j2.xml

WAR ≥ 2.x
CATALINA_HOME\webapps\<dashboard>\WEB-INF\classes\log4j2-spring.xml

ZIP ≥ 2.x
<unpacked_zip>\configurations\log4j2-spring.xml

To change the location of the log folder search for the following line in the file:

...

Code Block
languagetext
WAR 1.x
CATALINA_HOME\webapps\<dashboard>\test

WAR ≥ 2.x
CATALINA_HOME\webapps\<dashboard>\WEB-INF\classes\test

ZIP ≥ 2.x
<unpacked_zip>\configurations\test

Changing the log file roll over strategy

...

Code Block
languagetext
WAR 1.x
CATALINA_HOME\webapps\<dashboard>\WEB-INF\log4j2.xml

WAR ≥ 2.x
CATALINA_HOME\webapps\<dashboard>\WEB-INF\classes\log4j2-spring.xml

ZIP ≥ 2.x
<unpacked_zip>\configurations\log4j2-spring.xml

Find the following two elements which control the strategy (there are two elements per log file):

...

Code Block
languagetext
WAR 1.x
CATALINA_HOME\webapps\<dashboard>\WEB-INF\log4j2.xml

WAR ≥ 2.x
CATALINA_HOME\webapps\<dashboard>\WEB-INF\classes\log4j2-spring.xml

ZIP ≥ 2.x
<unpacked_zip>\configurations\log4j2-spring.xml

Add the line <AppenderRef ref="htmlout"/> to the following <Logger> elements in the file, this will give you the following:

...

Code Block
languagetext
WAR 1.x
CATALINA_HOME\webapps\<dashboard>\WEB-INF\log4j2.xml

WAR ≥ 2.x
CATALINA_HOME\webapps\<dashboard>\WEB-INF\classes\log4j2-spring.xml

ZIP ≥ 2.x
<unpacked_zip>\configurations\log4j2-spring.xml

Search for the following line in the file:

...

Code Block
languagetext
WAR 1.x
CATALINA_HOME\webapps\<dashboard>\WEB-INF\log4j2.xml

WAR ≥ 2.x
CATALINA_HOME\webapps\<dashboard>\WEB-INF\classes\log4j2-spring.xml

ZIP ≥ 2.x
<unpacked_zip>\configurations\log4j2-spring.xml

Uncomment the following sections as appropriate (this can be found at the end of the file):

...

Following any changes you make, save the .xml file and then restart your application server so that the changes are taken into account. Messages relating to Active Directory authentication will now be displayed in the log files.

Enabling DEBUG and SQL trace logs

By default, the log file will not contain any DEBUG or SQL trace logs. If you need to see these items in the log file, you can enable them as follows. Modify the following file with a text editor:

Code Block
languagetext
WAR 1.x
CATALINA_HOME\webapps\<dashboard>\WEB-INF\log4j2.xml

WAR ≥ 2.x
CATALINA_HOME\webapps\<dashboard>\WEB-INF\classes\log4j2-spring.xml

ZIP ≥ 2.x
<unpacked_zip>\configurations\log4j2-spring.xml

≤ 1.x

Locate the following section:

Code Block
languagetext
<Logger name="org.springframework.jdbc.core.JdbcTemplate" level="error" additivity="false">
	<AppenderRef ref="textout"/>
</Logger>
<Logger name="org.springframework.jdbc.core.StatementCreatorUtils" level="error" additivity="false">
	<AppenderRef ref="textout"/>
</Logger>

Change level="error" to level="debug" to enable DEBUG logs:

Code Block
languagetext
<Logger name="org.springframework.jdbc.core.JdbcTemplate" level="error" additivity="false">
	<AppenderRef ref="textout"/>
</Logger>
<Logger name="org.springframework.jdbc.core.StatementCreatorUtils" level="error" additivity="false">
	<AppenderRef ref="textout"/>
</Logger>

Additionally, if you want to see SQL trace logs as well as DEBUG information, change level="debug" to level="TRACE":

Code Block
languagetext
<Logger name="org.springframework.jdbc.core.JdbcTemplate" level="TRACE" additivity="false">
	<AppenderRef ref="textout"/>
</Logger>
<Logger name="org.springframework.jdbc.core.StatementCreatorUtils" level="TRACE" additivity="false">
	<AppenderRef ref="textout"/>
</Logger>

≥ 2.x

Locate the following commented section:

Code Block
languagetext
<!-- <Logger name="org.springframework.jdbc.core" level="debug" additivity="false"> 
   <AppenderRef ref="textout"/>
</Logger> -->

Uncomment this section to enable DEBUG logs:

Code Block
languagetext
<Logger name="org.springframework.jdbc.core" level="debug" additivity="false"> 
   <AppenderRef ref="textout"/>
</Logger>

Additionally, if you want to see SQL trace logs as well as DEBUG information, change level="debug" to level="TRACE":

Code Block
languagetext
<Logger name="org.springframework.jdbc.core" level="TRACE" additivity="false"> 
   <AppenderRef ref="textout"/>
</Logger>

Following any changes you make, save the .xml file and then restart your application server so that the changes are taken into account.