The following properties of the FormattingFileLogger component enable you to control how you name the log files:

Property Name

Property Type

Function

Example

logFileDir

string

specifies the directory in which to write log files, relative to <ATG2007.3dir>/home/

logs

logFileName

string

specifies the first element of the log’s file name

logFileName=
userevents_

logFileExtension

string

specifies the file extension (such as data, log) that is attached to each log file

logFileExtension=
data

timestampLogFileName

Boolean

if set to true, then a timestamp is included in each log file name

timestampDateFormat

string

specifies the date format to use in file name timestamps

MM-dd-yyyy_HH-mm-ss-SS

For example, the following property settings would result in log file names like userevents_02-09-2001_18-36-03-55.data:

logFileName=userevents_
logFileExtension=data
timestampLogFileName=true
timestampDateFormat=MM-dd-yyyy_HH-mm-ss-SS

Using timestamps in your log file names ensures that log files have unique names and are preserved on application restarts.

Note that in the timestampDateFormat, you should avoid using separator characters that would result in invalid file names in your operating system. For example, if you set:

timestampDateFormat=yyyy-MM-dd_HH:mm:ss

then the resulting log file name would be like this:

userevents_02-09-2001_18:36:03.data

Since the colon ( : ) is not a valid character in Windows file names, this would result in errors on a Windows platform.

The schedule and scheduler properties of the FormattingFileLogger determine when a log file is closed and a new log created with a new name.

 
loading table of contents...