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 Application in the list:

Select the Logs option:

Logs produced by the Console system

The following log files are produced by Console:

ReleaseServiceLog file locationDescriptionLog roll over
≥ 2.x Enterprise


Gateway%PROGRAMDATA%\CAST\CAST-Imaging-Console\AIP-Gateway\logs\aip-gateway.logLogs all messages from the service. For example, startup sequence etc.


Log file will be rolled over in the following situations:

  • If the file reaches the maximum size of 2MB
  • At midnight each day
  • When the service is restarted

A rollover means that the file will be compressed in a .GZ archive with the date in the resulting file name. A history of GZ files will be retained, before the oldest is removed.

Note that for the Keycloak/SSO service only, the log file will be rolled over at midnight each day, when a new file is started.


Service Registry%PROGRAMDATA%\CAST\CAST-Imaging-Console\AIP-Gateway\logs\aip-service-registry.log
Keycloak/SSO

%PROGRAMDATA%\CAST\CAST-Imaging-Console\AIP-SSO\log\aip-sso-service-stderr.YYYY-MM-DD.log

%PROGRAMDATA%\CAST\CAST-Imaging-Console\AIP-SSO\log\aip-sso-service-stdout.YYYY-MM-DD.log

%PROGRAMDATA%\CAST\CAST-Imaging-Console\AIP-SSO\log\service.YYYY-MM-DD.log

Node%PROGRAMDATA%\CAST\AIP-Node\logs\aip-node.log
\\share\aip-node-data\common-data\job-logs\<application_guid><job_action>\<job>.log

Logs actions related to applications, such as:

  •  accept
  • analyze
  • attach_package_to_version
  • create_package
  • deliver_version
  • import_preferences
  • install_extensions
  • manage_application
  • process_imaging
  • restore_triplet
  • setcurrent
  • snapshot
  • snapshot_indicator
  • upload_application

Logs are not rolled over.

≥ 2.x StandaloneFront-end/Node combined

%PROGRAMDATA%\CAST\AIP-Console-Standalone\logs\aip-node.log

Logs all messages from the service. For example, startup sequence etc.

Log file will be rolled over in the following situations:

  • If the file reaches the maximum size of 2MB
  • At midnight each day
  • When the service is restarted

A rollover means that the file will be compressed in a .GZ archive with the date in the resulting file name. A history of GZ files will be retained, before the oldest is removed.

NodeC:\\aip-node-data\common-data\job-logs\<application_guid><job_action>\<job>.log

Logs actions related to applications, such as:

  •  accept
  • analyze
  • attach_package_to_version
  • create_package
  • deliver_version
  • import_preferences
  • install_extensions
  • manage_application
  • process_imaging
  • restore_triplet
  • setcurrent
  • snapshot
  • snapshot_indicator
  • upload_application
Logs are not rolled over.
1.x

Console front-end

%PROGRAMDATA%\CAST\AipConsole\AipConsole\logs\webi.log

%PROGRAMDATA%\CAST\AipConsole\AipConsole\logs\webi_error.log


Logs all messages from the package. For example, startup sequence etc. Message stamped as "ERROR" will also be listed in the file named "_error.log".

Log file will be rolled over in the following situations:

  • If the file reaches the maximum size of 2MB
  • At midnight each day
  • When the package is restarted

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 the "logs" folder. A history of 30 ZIP files will be retained per date stamped folder, before the oldest is removed.

%PROGRAMDATA%\CAST\AipConsole\<package>\logs\audit\audit.log

Contains an audit trail so that it is possible to see which user has performed an action. The following actions are logged:

  • APPLICATION_STARTUP (INFO)
  • APPLICATION_SHUTDOWN (INFO)
  • CREATE_APPLICATION <application> (INFO)
  • CREATE_DOMAIN <domain> (INFO)
  • DELETE_APPLICATION <application> (INFO)
  • DELETE_DOMAIN <domain> (INFO)
  • MOVE_APPLICATION (INFO)
  • USER_LOGIN_SUCCESSFUL (INFO)
  • USER_LOGIN_FAILED (WARN)
  • USER_LOGOUT (INFO)
  • USER_SESSION_TIMEOUT (INFO)

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.

Log file will be rolled over in the following situations:

  • If the file reaches the maximum size of 2MB
  • At midnight each day
  • When the AIP Console package is restarted

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 the "logs\audit" folder. A history of 30 ZIP files will be retained per date stamped folder, before the oldest is removed.

Node

%PROGRAMDATA%\CAST\AipConsole\AipNode\logs\cmsapi.log

%PROGRAMDATA%\CAST\AipConsole\AipNode\logs\cmsapi_error.log

Logs all messages from the package. For example, startup sequence etc. Message stamped as "ERROR" will also be listed in the file named "_error.log".

Log file will be rolled over in the following situations:

  • If the file reaches the maximum size of 2MB
  • At midnight each day
  • When the package is restarted

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 the "logs" folder. A history of 30 ZIP files will be retained per date stamped folder, before the oldest is removed.

%PROGRAMDATA%\CAST\AipConsole\AipNode\logs\external_logs\<application_guid>-<action>-YYYYMMDD_HHMMSS.txt

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>:

  • accept a delivery
  • analyze an Application
  • create a Dashboard Service schema
  • create an Analysis Service schema
  • create a Management Service schema
  • create a Management Service schema and update delivery plugins (ensure correct plugins are present in the Delivery/plugins folder).
  • import preferences (equivalent to the CAST Management Studio CLI "configurePlatformPreferences")
  • manage application (ensure the Application is set to be managed in the AIP Console)
  • set_current (equivalent to the CAST Management Studio CLI "setAsCurrentVersion")
  • snapshot (equivalent to the CAST Management Studio CLI "GenerateSnapshot")

Logs are not rolled over.

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). You can change this location if necessary, see Configure AIP Node storage folder locations - optional - v. 2.x or Configure AIP Node storage folder locations - optional - v. 1.x:

%PROGRAMDATA%\CAST\CAST\Logs\

Configuring a log message limit per Node

This customization is performed on a per-Node basis, therefore repeat the process for each Node you wish to customize.

When an analysis job (or any other job actioned by a Node) generates too many log messages, it can cause out of memory issues, in turn causing the job itself to fail. If you are facing this issue, you can configure a log message limit on a per-Node basis to prevent too many errors from being fetched and displayed within the Log Console in the Summary section:

To do so:

≥ 2.x

Locate and edit the following properties file:

Enterprise mode: %PROGRAMDATA%\CAST\AIP-Node\application-default.yml

Copy the following into the file and modify the limit value to the require value (-1 sets no limit):

logging:
	summary:
    	limit: -1

For example to set a limit of 1000 messages:

logging:
	summary:
    	limit: 1000

Save the file and then restart the relevant Node service(s) to ensure the changes are taken into account.

The default values are present in the application.yml file located alongside the application-default.yml file, however, you should always edit the application-default.yml for customization purposes since it overrides the content of application.yml and the file is never overwritten during an upgrade.

1.x

Locate and edit the following properties file:

%PROGRAMDATA%\CAST\AipConsole\AipNode\aip-node-app.properties

Locate the following section and modify the limit value to the require value (-1 sets no limit):

# ==============
# this value to limit the number of messages in each log message section to avoid too big and unusable summary (-1 is no limit)
logging.summary.limit=-1

For example to set a limit of 1000 messages:

# ==============
# this value to limit the number of messages in each log message section to avoid too big and unusable summary (-1 is no limit)
logging.summary.limit=1000

Save the file and then restart the relevant Node service(s) to ensure the changes are taken into account.

Enabling DEBUG mode for SAML and LDAP/AD authentication

This section of documentation is valid only for Console 1.x. To debug SAML/LDAP/AD authentication when using Console 2.x Enterprise mode, use the SSO/Keycloak logs located in %PROGRAMDATA%\CAST\CAST-Imaging-Console\AIP-SSO\log.

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 files:

Console 1.x
%PROGRAMDATA%\CAST\AipConsole\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 Console. DEBUG information for authentication will be saved to:

Windows:
%PROGRAMDATA%\CAST\AipConsole\AIPConsole\logs\webi.log

Linux:
<data_folder>\AipConsole\logs\webi.log