Summary: This page describes how logging functions in Console.
Introduction
Console provides its own logging mechanism and also makes use of each analyzer's logging mechanism available on each Node.
Viewing logs in Console
There are two ways to view logs in Console:
View log option
On completion of each action, use the View Log option. A log is available for each step in the process that has been run:
The log will be displayed:
Click to enlarge
≥ 2.x | |
---|---|
1.x |
In some cases, a Summary is displayed initially. You can Switch to Logs/Content mode to view the actual log file:
Click to enlarge
≥ 2.x | |
---|---|
1.x |
Logs can be downloaded to file using the download button while in Logs/Content mode:
Click to enlarge
≥ 2.x | |
---|---|
1.x |
In ≥ 2.x, the theme can be toggled between black and white:
Click to enlarge
Log console
The Log console is organised on a "per-Application basis". You can find out more about this in Application - Logs. To access the console, move to the Console screen if you are not already there:
Select the Logs option:
Logs produced by the Console system
The following log files are produced by Console - they offer a high level view of each action being logged. Note that <package> refers to the name of the package (Node or Console):
Package | Log File | Location | Description | Log roll over |
---|---|---|---|---|
Node / Console | <package>.log | Windows:
Linux:
| Logs all messages from the package. For example, startup sequence etc. | Log file will be rolled over in the following situations:
A rollover means that the file will be zipped with the date in the resulting ZIP file name, and the ZIP file will be stored in a date stamped folder in |
Node / Console | <package>_error.log | Windows:
Linux:
| Logs all error messages from the package. | Log file will be rolled over in the following situations:
A rollover means that the file will be zipped with the date in the resulting ZIP file name, and the ZIP file will be stored in a date stamped folder in |
Node | <application_guid>-<action>-YYYYMMDD_HHMMSS.txt | Windows:
Linux: N/A | Multiple log files for each action performed, using both the .txt and .castlog extensions. One log file is generated for each of the following <action> performed for a given <application_name>:
|
|
Console | audit.log | Windows:
Linux:
| Contains an audit trail so that it is possible to see which user has performed an action. The following actions are logged:
The log uses the following format: YYYY-MM-DD HH:MM:SS,SSS | <host_name or IP_address> | <user_name> | <message_type> | <message> Where an IP address or host name cannot be determined, the log will use UNKNOWN_HOST instead. |
A rollover means that the file will be zipped with the date in the resulting ZIP file name, and the ZIP file will be stored in a date stamped folder in |
Logs produced by AIP Core
AIP Core on each Node will produce logs related to code delivery/analysis/snapshot activities (these are displayed in Console). The logs will be stored by default in the following location on each Node (one sub-folder folder will be created per Application onboarded in Console). In v. 1.x, you can change this location if necessary - see Configure AIP Node storage folder locations - optional - v. 1.x:
%PROGRAMDATA%\CAST\CAST\Logs\
Changing log file storage location and rollover rules for Console/Node logs
You can change the location used to store AIP Console/AIP Node log files and their rollover rules by modifying the following files:
%PROGRAMDATA%\CAST\AipConsole\AipConsole\log4j2-spring.xml %PROGRAMDATA%\CAST\AipConsole\AipNode\log4j2-spring.xml >>> must be changed on EACH AIP Node
Enabling DEBUG mode for SAML and LDAP/AD authentication
When configuring SAML or LDAP/AD authentication (see Configuring User Authentication) it may be useful to enable DEBUG logging mode to help trace issues. To do so, edit the following file for AIP Console:
Windows: %PROGRAMDATA%\CAST\AipConsole\AipConsole\log4j2-spring.xml Linux: <data_folder>\AipConsole\log4j2-spring.xml
Locate the following lines:
<Loggers> <Logger name="org.hibernate" level="ERROR"/> <Logger name="org.springframework" level="ERROR"/> <Logger name="org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl" level="ERROR"/> <Logger name="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping" level="INFO"/> <Logger name="org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer" level="INFO"/> <Logger name="org.reflections.Reflections" level="WARN"/> <!--to see SQL generated by hibernate, change this to DEBUG--> <Logger name="org.hibernate.SQL" level="ERROR"/> <Root level="INFO"> <AppenderRef ref="Console"/> <AppenderRef ref="webi_log"/> <AppenderRef ref="webi_error_log"/> </Root> <Logger name="com.castsoftware.aip.console.services.audittrail.AuditTrail" level="ALL" additivity="false"> <AppenderRef ref="AuditTrail"/> </Logger> </Loggers>
Add the following to the <Loggers> element depending on what you need to DEBUG:
For LDAP/AD: <Logger name="com.castsoftware.aip.console.services.ldap" level="DEBUG"/> <Logger name="org.springframework.security.ldap" level="DEBUG"/> <Logger name="org.springframework.ldap" level="DEBUG"/> For SAML: <Logger name="com.castsoftware.aip.console.security.saml" level="DEBUG"/> <Logger name="org.springframework.security.saml" level="DEBUG"/>
For example, to debug LDAP/AD authentication, the three loggers have been added just after <Loggers>:
<Loggers> <Logger name="com.castsoftware.aip.console.services.ldap" level="DEBUG"/> <Logger name="org.springframework.security.ldap" level="DEBUG"/> <Logger name="org.springframework.ldap" level="DEBUG"/> <Logger name="org.hibernate" level="ERROR"/> <Logger name="org.springframework" level="ERROR"/> <Logger name="org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl" level="ERROR"/> <Logger name="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping" level="INFO"/> <Logger name="org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer" level="INFO"/> <Logger name="org.reflections.Reflections" level="WARN"/> <!--to see SQL generated by hibernate, change this to DEBUG--> <Logger name="org.hibernate.SQL" level="ERROR"/> <Root level="INFO"> <AppenderRef ref="Console"/> <AppenderRef ref="webi_log"/> <AppenderRef ref="webi_error_log"/> </Root> <Logger name="com.castsoftware.aip.console.services.audittrail.AuditTrail" level="ALL" additivity="false"> <AppenderRef ref="AuditTrail"/> </Logger> </Loggers>
Save the file and restart AIP Console. DEBUG information for authentication will be saved to:
Windows: %PROGRAMDATA%\CAST\AipConsole\AIPConsole\logs\webi.log Linux: <data_folder>\AipConsole\logs\webi.log