IOS Logging

You can set up logging for the Internet Object Services through the ios_logging.xml file. This file is located in %LAWDIR%\system, which is also the default location of the log files. The IOS logging relies on log4j2 technology, allowing you to specify different levels of detail for the logging, different software components to log, and different characteristics for the log files (such as the name and location).

The default logging level is INFO. The available logging levels are, in order of decreasing priority, ERROR, WARN, INFO, DEBUG, and TRACE. Also, by default, the IOS logging is set to RollingFileAppender. This means that once the log file reaches the maximum size specified, another log file is created, up to a maximum of five. The log files are named ios.log.1, ios.log.2, and so on.

The new versions of the .xml and .properties file are only supported in these releases:

  • LSF SP11 CU9 and later
  • LSF SP10 CU7 and later
  • LSF SP9 CU6 and later

IOS logging will still support the new version of the .properties file, however, since moving to log4j2, the preferred configuration file is ios_logging.xml. If both files exist in %LAWDIR%\system, IOS will prioritize loading ios_logging.xml.

Another change in the ios_logging.xml is the maximum file size before rolling over and the maximum number of rolled over files present at a time. The previous values were 2048KB and 5 respectively, and the new values are 10240KB and 10.

Sample ios_logging.xml file:

<!--Non-Compressing RollingFileAppender-->
<RollingFile name="IOS" fileName="${log-path}/ios${serverName}.log" filePattern="${log-path}/ios${serverName}.log.%i">
<!--Compressing RollingFileAppender-->
<!-- <RollingFile name="IOS" fileName="${log-path}/ios${serverName}.log" filePattern="${log-path}/ios${serverName}.log.%i.zip"> -->
<PatternLayout>
<pattern>%d{ISO8601} %-5p [%t] [%-10X{product}][%-12X{username}] [%-12X{servlet}] [%c{1}] %m%n</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="10240 KB" />
</Policies>
<DefaultRollOverStrategy max ="10"/>
</RollingFile>

IOS logging compression

You can compress large ios.log files into smaller .zip files to save disk space. Compression is performed when an ios.log file has reached the set maximum file size limit and is about to be rolled over. You can configure this setting through the ios_logging.xml or ios_logging.properties file located in %LAWDIR%\system.

Performing IOS logging compression through ios_logging.xml

Whether using a clustered or non-clustered application server, uncomment the line after Compressing RollingFIleAppender and comment the line after the Non-Compressing RollingFileAppender

<!--Compressing RollingFileAppender-->
		<RollingFile name="IOS" fileName="${log-path}/ios${serverName}.log" filePattern="${log-path}/ios${serverName}.log.%i.zip">

Performing IOS logging compression through ios_logging.properties

Whether using a clustered or non-clustered application server, uncomment the lines after Compressing RollingFIleAppender and comment the lines after the Non-Compressing RollingFileAppender

#Compressing RollingFileAppender
appender.rolling.type = RollingFile
appender.rolling.name = IOS
appender.rolling.fileName = ${logPath}/ios${serverName}.log
appender.rolling.filePattern = ${logPath}/ios${serverName}.log.%i.zip
appender.rolling.layout.type = PatternLayout
appender.rolling.layout.pattern = %d{ISO8601} %-5p [%t] [%-10X{product}][%-12X{username}] [%-12X{servlet}] [%c{1}] %m%n
appender.rolling.policies.type = Policies
appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
appender.rolling.policies.size.size = 10240KB
appender.rolling.strategy.type = DefaultRolloverStrategy
appender.rolling.strategy.max = 10

Single log files are compressed into single .zip files. Compressed log files are moved into to a .zip file with the format ios.log.1.zip.

Older .zip files are shifted one index. For example, ios.log.2.zip is renamed to ios.log.3.zip, ios.log.3.zip to ios.log.4.zip, and so on. The oldest .zip file will be deleted once it exceeds the set maximum backup index indicated in the ios_logging file.

When transitioning from non-compressing to compressing, not only is the latest ios.log compressed to a .zip file, but the old ios.log.X uncompressed files are also compressed into ios.log.X.zip files.

When transitioning back from compressing to non-compressing, the old .zip files will not be deleted, but succeeding rolled over files will no longer be compressed and will continue to follow the ios.log.1 format.