GO Loader Aviation 1.2 is here! Take a look at what's new.
Skip to end of metadata
Go to start of metadata

The logging system of GO Loader Aviation is based on the logging framework Logback. It provides a rich set of logging features and is configurable by XML based configuration files. In this section we describe some basic configuration options which are relevant within the context of GO Loader Aviation. For more detailed documentation of the Logback configurations refer to the Logback Manual

GO Loader Aviation log files

When GO Loader Aviation is performing operations on the database, these include dropping/creating indices/tables and loading data, it logs info and error messages. These are shown on the user interface and by default are appended to a rolling log file.

By default, log files will roll every month or when they reach 1GB in size.

Log File Configuration

There is a separate log configuration file (logback.xml) for both:

  • GO Loader Aviation Studio
  • GO Loader Aviation Agent

The default [Application Data Directory Home] is: C:\Users\[username]\goloader\

The location of these configuration files depends on the location of the application data home directory (specified when you first run either Studio or Agent):

GO Loader Studio: [ApplicationDataHomeDirectory]\studio\logback.xml
GO Loader Agent: [ApplicationDataHomeDirectory]\agent\logback.xml

To customise the logging configuration you will need to edit the configuration file

  • Each configuration file contains defaults for logging, which can be overridden.
  • GO Loader Aviation will apply the changes after the next start of the application, so it is recommended that you close GO Loader Aviation before editing your logging settings.
  • We recommend specifying overrides when using both Agent and Studio so they log to separate locations.

Logging Levels

You can change the level of information returned in a log file.

ERROR – lowest detail level of logging and only errors will be logged.
WARN
INFO – default
DEBUG
TRACE – highest detail level of logging. It could be difficult to find important information in the all messages dump to the logs

 

If you wish to change the level of logging, edit the level value in the root element of the logback.xml config file.

<root>
		<level value="info" />
		<appender-ref ref="Topic-MESSAGES-TAB" />
		<appender-ref ref="Topic-DETAIL-TAB" />
		<appender-ref ref="Topic-MESSAGE-DIALOG" />
		<appender-ref ref="SFGUI" />
		<appender-ref ref="GO-LOADER-LOG" />
</root>

Appenders

Appenders can be turned on or off in the logback file by adding or removing their reference from the <root> element.

Topic-MESSAGES-TAB, Topic-DETAIL-TAB, Topic-MESSAGE-DIALOG, and SFGUI

By default the Topic-MESSAGES-TAB, Topic-DETAIL-TAB, Topic-MESSAGE-DIALOG, and SFGUI appenders are enabled in the logback.xml file, which control the level of logging shown on the GO Loader Aviation user interface.

Logging Defaults

  • <file> (default = [ApplicationDataHomeDirectory]\logs\goloader.log); this is the location AND name of the log file
  • <rollingPolicy> (default = TimeBasedRollingPolicy); this is default use a time based rolling mechanism.
  • <fileNamePattern> (default = goloader-%d{yyyy-MM}.%i.log); Naming pattern for the rolling of log files. The first log file of a new month will look like 'goloader_2014-12.0.log'
  • <maxFileSize> (default = 1GB): the default file size you want logs to roll at.
	<appender name="GO-LOADER-LOG"	class="ch.qos.logback.core.rolling.RollingFileAppender">
		<file>${application.datahome.goloader}/logs/goloader.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<!-- Monthly rollover -->
			<fileNamePattern>${application.datahome.goloader}/logs/goloader-%d{yyyy-MM}.%i.log</fileNamePattern>
			<timeBasedFileNamingAndTriggeringPolicy	class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
				<!-- or whenever the file size reaches 1GB -->
				<maxFileSize>1GB</maxFileSize>
			</timeBasedFileNamingAndTriggeringPolicy>
		</rollingPolicy>
		<!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder	by default -->
		<encoder>
			<Pattern>%X{session_id}	%date{"yyyy-MM-dd HH:mm:ss.SSS"}	%-5level	%msg%n</Pattern>
		</encoder>
	</appender>

For more details about log file rolling see the RollingFileAppender section in the Logback Manual.

Importing into Excel

Excel can only handle files up to 10MB in size. If you would like to import the log files into Excel for data analysis you should set the rolling log size to 10MB or less.

Loading using multiple concurrent Agent instances

When using simultaneous GO Loader Aviation instances it is possible that the rolling of log files can create non sequential numbers with varying file sizes. If file date and size rolling is preferred you can set a <prudent> flag on the appender. This however causes a new log file to be generated for every GO Loader session. The default appender has been adjusted to cope with multiple instances and is shown below.

 Click here to see an example with the prudent flag...
	<appender name="GO-LOADER-LOG"	class="ch.qos.logback.core.rolling.RollingFileAppender">
		<prudent>true</prudent>
		<file>${application.datahome.goloader}/logs/goloader.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<!-- Monthly rollover -->
			<fileNamePattern>${application.datahome.goloader}/logs/goloader-%d{yyyy-MM}.%i.log</fileNamePattern>
			<timeBasedFileNamingAndTriggeringPolicy	class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
				<!-- or whenever the file size reaches 1GB -->
				<maxFileSize>1GB</maxFileSize>
			</timeBasedFileNamingAndTriggeringPolicy>
		</rollingPolicy>
		<!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder	by default -->
		<encoder>
			<Pattern>%X{session_id}	%date{"yyyy-MM-dd HH:mm:ss.SSS"}	%-5level	%msg%n</Pattern>
		</encoder>
	</appender>

 

Rolling Policy

This is a time based rolling policy.

FileNamePattern

The log file rolls over every day at midnight, set by the <fileNamePattern> tag.

The pattern %d{yyyy-MM-dd} indicates that it will rollover every day. The table below provides other examples you could use.

PatternEffect
%d{yyyy-MM-dd-HH-ss}Rollover every second
%d{yyyy-MM-dd-HH}Rollover every hour
%d{yyyy-MM-dd}Rollover every day
%d{yyyy-MM}Rollover every month
%d{yyyy}Rollover every year

Having a lengthy time based rollover period could cause problems if not combined with file size rolling. This is because the file could become too large for the file system.

 

Log File Increments

The '%i' in the <fileNamePattern> tag represents an incrementing number, inserted in the log file name and is incremented each time a log file is created in the same rolling policy period (the default of which is in a single day).

MaxFileSize

The log file rolls when it reaches 1GB in size. To change the size the file rolls at change the value between the <maxFileSize> tags. Size can be specified in KB, MB, GB.

If the max file size is set very high, the log file could become very large and cause issues when trying to access it. Operating systems have limits on file sizes and directories so be sure to take this into account when defining the maximum file size.

 

Restoring the Defaults

To reset the defaults simply delete the configuration file and on the next start of GO Loader Aviation a file containing the default values will be created in the application data home directory.

  • No labels