This section describes those aspects of logging configuration that apply to all logging components.
Enabling Data Logging
Logging components can be enabled individually or as a group. By default, the enabled
property of each individual file logger is set to refer to the enabled
property of an /atg/dynamo/service/
component. Therefore, data collection for the product catalog can be enabled by setting the enabled
property of the /atg/dynamo/service/DeploymentDWDataCollectionConfig
component to true
. Data collection for all other file loggers can be enabled by setting the enabled
property of the /atg/dynamo/service/DWDataCollectionConfig
component to true
.
Changing the enabled
property of either component affects all of the loggers that point to that component. After enabling any disabled logging component, you must restart the ATG instance to begin logging.
Configuring Log File Rotation
You can schedule file rotation using the schedule
property of each of the individual file logging components. For example, to rotate the segment fie log hourly, in the /atg/reporting/datacollection/userprofiling/SegmentFileLogger.properties
set the following:
schedule=every 1 hour without catch up
For information on how to specify a schedule, see the Scheduler Services section of the Core Dynamo Services chapter in the ATG Programming Guide.
You can use the dataItemThreshold
of each component to trigger log rotation when the specified number of log records is exceeded. If you set both properties, the log will be rotated whenever it exceeds the dataItemThreshold
and at the scheduled time, as long as the log file contains at least one log entry.
By default, the loggers are scheduled to rotate as follows:
Product Catalog—Every 15 minutes
User—Hourly
Segment--Hourly
Site Visit—Hourly
Order--Hourly
Configuring Timestamp Formats in Log Entries
To change the timestamp formatting in log entries, edit the formatFields
property in the file logging component. For example, to change the timestamp format for the user file logger, edit the timestampDateFormat
property in /atg/reporting/datacollection/userprofiling/UserFileLogger.properties
:
timestampDateFormat=MM-dd-yyyy_HH-mm-ss-SS
Configuring Log File Location
Both the logging and file loading components need to know the location of the log files. Both components must be configured to point to the same physical location, though the logical names may differ depending on your network configuration.
The log file location is configured by the defaultRoot
property in all logging and loading components. By default, all of these components are configured to refer to the DYNAMO_HOME/logs
directory.