Page tree
Skip to end of metadata
Go to start of metadata

Summary: This page describes how logging functions in the AIP Console.

Introduction

The AIP Console provides its own logging mechanism and also makes use of CAST AIP's logging mechanism on each AIP Node.

Viewing logs in the AIP Console

There are two ways to view logs in the AIP 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 in Summary mode:

Click to enlarge

Switch to Content mode to view the actual log file:

Click to enlarge

Logs can be downloaded to file using the download button while in Content mode:

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 AIP Console screen if you are not already there:

Select the Application in the list:

Select the Logs option:

Logs produced by the AIP Console system

The following log files are produced by the AIP Console - they offer a high level view of each action being logged. Note that <package> refers to the name of the package (AIP Node or AIP Console):

PackageLog FileLocationDescriptionLog roll over
AIP Node / AIP Console<package>.log

Windows:

%PROGRAMDATA%\CAST\AipConsole\<package>\logs

Linux:

<data_folder>\AipConsole\logs


Logs all messages from the package. 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 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 %PROGRAMDATA%\CAST\AipConsole\<package>\logs or <data_folder>\AipConsole\logs. A history of 30 ZIP files will be retained per date stamped folder, before the oldest is removed.

AIP Node / AIP Console<package>_error.log

Windows:

%PROGRAMDATA%\CAST\AipConsole\<package>\logs

Linux:

<data_folder>\AipConsole\logs

Logs all error messages from the package.

Log file will be rolled over in the following situations:

  • Every 5 days
  • When the AIP Console 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 %PROGRAMDATA%\CAST\AipConsole\<package>\logs\errors or <data_folder>\AipConsole\logs\error. A history of 30 ZIP files will be retained per date stamped folder, before the oldest is removed.

AIP Node<application_guid>-<action>-YYYYMMDD_HHMMSS.txt

Windows:

%PROGRAMDATA%\CAST\AipConsole\<package>\logs\external_logs

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

  • 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.
  • Only produced by the analysis node package (AIP Node).
AIP Consoleaudit.log

Windows:

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

Linux:

<data_folder>\AipConsole\logs\audit


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.
  • Only produced by the front-end package (AIP Console).
  • 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 %PROGRAMDATA%\CAST\AipConsole\<package>\logs\audit or <data_folder>\AipConsole\logs\audit. A history of 30 ZIP files will be retained per date stamped folder, before the oldest is removed.

Logs produced by AIP Core

AIP Core on each AIP Node will produce logs related to code delivery/analysis/snapshot activities (these are displayed in AIP Console). The logs will be stored by default in the following location on each AIP Node (one sub-folder folder will be created per Application onboarded in AIP Console). You can change this location if necessary - see Configure AIP Node storage folder locations - optional:

%PROGRAMDATA%\CAST\CAST\Logs\

Changing log file storage location and rollover rules for AIP Console/AIP 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:

%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 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
  • No labels