The Adaptiva Server and Adaptiva Client create numerous log files to record the actions of the various processes and threads of what is logged, or the number of log files that are kept for a specific component. Review the sections in this document to understand the capabilities and how to make the changes.
Refer to [Appendix A] of the [User Guide], for a list and brief description of all Adaptiva Server and Adaptiva Client log files.
The logging configuration settings are maintained in several files in the CONFIG folder. This article covers the modification of three of these files. Other files should not be modified unless directed by Adaptiva Customer Support. It is always best practice to make a backup of these files before making any changes.
Note
These files may change when Adaptiva Server Installer or Adaptiva Client Installer is run. Keep a backup of the changes that you have made.
Default Log File Configuration location:
- Server
<drive>:\Program Files\Adaptiva\AdaptivaServer\config- Client
C:\Program Files\Adaptiva\AdaptivaClient\config
Configuration Files
AdaptivaLoggingLevels.xmlLogging Levels: This determines the level of detail written to the log file.
AdaptivaLoggingComponents.xmlLogging Components: This determines which components are logged to which log file.
Log4j2.xmlLog File Size and Quantity: This determines how large the log file can grow before a new file is created. It also determines how many log files are kept.
The Logging Levels file determines what the system logs and at what level. You can set six different levels. Follow the instructions from Adaptiva Customer Support to configure the appropriate level. Keep in mind that increasing the logging level may cause the file to fill up faster. You may need to increase the log file size or the number of log files. Each log level has a specific priority.
See the following Logging Levels in ascending order of priority:
Trace
- DEBUG
Debug level logging.
- INFO
Default logging level.
- WARN
Only writes warning messages.
- ERROR
Only writes error messages.
- FATAL
Only writes fatal messages.
- Open
AdaptivaLoggingComponents.xmlin a text editor with Administrative permissions to the appropriate folder. -
The logging level entries are in the following format within the
<AdaptivaLogging>root element:<component name='[class name]' level='[logging level]'/>-
[class name]: Starts withcom.Adaptivaand will be provided by Adaptiva Customer Support to enable custom logging. -
[logging level]: One of the above logging levels. Level entries should be entered in all uppercase.
-
-
If you are modifying an existing component, locate it in the list and then update the level entry. For example, to get
DEBUGlevel logging for the Patching Intent schema change the following line:<component name='com.adaptiva.patching.deploy.server.intent' level='DEBUG'/> -
If you are creating a new entry, insert it under
<!—User defined logging control -->. For example, to add logging to theAdaptiva.logfile for theClientTableSupportercomponent, add the following line:<component name='com.Adaptiva.fw.clienttablesupporter' level='DEBUG'/> -
Save and close the file. No restart required. The new logging will start within the next minute.
Note
Avoid entering the same component multiple times with different logging levels. The system uses the entry with the highest logging level priority to determine what it writes to the log file.
Use Logging Components to configure which file a component writes to. The system writes all log entries to Adaptiva.log. To direct log entries to a specific component file, add a Logging Component entry.
- Open
AdaptivaLoggingComponents.xmlin a text editor with Administrative permissions to the appropriate folder. -
The logging component entries are in the following format within the
<AdaptivaLoggingComponents>root element:<component name="[component name]"> <module>[class name]</module> </component>
[component name]is the name of the file to be written to. This file is created in the following folder path:\Logs\ComponentsLogs[class name]is the same class name entered inAdaptivaLoggingLevels.xml. Multiple class names can be entered in the module element. - If modifying an existing component, locate the component in the list, and then make the appropriate changes. If creating a new logging component, add it to the end before the closing root element
</AdaptivaLoggingComponents> -
If creating a new logging component, add it to the end before the closing root element
</AdaptivaLoggingComponents>. For example, to write thefw.clienttablesupportclass to a file with the nameClientTableSupporter.log, add the following component:<component name="ClientTableSupporter"> <module>com.adaptiva.fw.clienttablesupporter</module> </component>
- Save and close the file. No restart required. The new logging will start within the next minute.
Uncontrolled log file growth can overwhelm the system. To prevent this, configure the log file size and the number of log files to maintain appropriate limits. This configuration file also defines the default layout of the log file, including the date and time stamp format and the order of the message that is written. Each component log file is 1MB by default. You can also change the size and quantity of system-level log files.
- Open
Log4j2.xmlin a text editor running with Administrative permissions from the appropriate folder. -
The
<Configuration>root element contains several elements. The Appenders element defines the default sizes. Within this element, multiple Routing elements specify how the system writes the log file, its maximum size, and files it maintains. For example, the default configuration for a component log is defined by the following components:-
[RollingFile]:This defines the location where the file should be written. -
[Pattern]:This defines the format of the log text. -
[SizeBasedTriggeringPolicy]:This defines the size of the log file. -
[DefaultRolloverStrategy]:This defines the number of log files to keep.
-
-
Find the list labeled
<Routing name="ComponentLog">. Components that are written to their own file appear as the following example entry:<Route key="[component name]" ref="[routing name]"/>[component name]is the name of the file to be written to. This file is created in the following folder path:\Logs\ComponentsLogs[routing name]is one of the defined routing names. See the route name details in the table below.Routing Name File Size Number of Files ComponentLogDefault1 MB 1 file ComponentLogModerate10 MB 1 file ComponentLogLarge10 MB 10 files ComponentLogVeryLarge10 MB 25 files ComponentLog1GB1024 MB 2 files -
If you are modifying an existing component, find the component in the list and make the appropriate change to the routing name.
Note
If you are creating a new entry, add it to the end before the closing root element
</Routes>. For example, to write theClientTableSupportercomponent to a file with the same name (ClientTableSupporter.log) add the following entry:<Route key="ClientTableSupporter" ref="ComponentLogLarge"/>The above entry configures the
ClientTableSupporter.logfile to be a maximum of 10 MB and to retain ten (10) files. - Save and close the file. No restart required. The new logging will start within the next minute.
You can apply additional configuration options to workflow logs. You can configure individual workflows to use one of two different default log file sizes or create additional configurations with different sizes. The system writes all workflow logs to the following log location:
\Logs\WorkflowLogs
See the two default file sizes of workflow logs in the table below.
| Routing Name | File Size | Number of Files |
|---|---|---|
WorkflowLogDefault |
2 MB | 10 files |
WorkflowLogLarge |
10 MB | 10 files |
All workflows use the WorkflowLogDefault size unless configured otherwise.
- Obtain the Workflow Object ID from the Workflow Designer.
-
Find the list appearing with the following line:
<Routing name="WorkflowLog"> -
Add an entry to the end before the closing root element
</Routes>, to change the logging for a specific workflow.For example, to use
WorkflowLogLargefor the workflow with Object ID 101609, add the following line:<Route key="101609" ref="WorkflowLogLarge"/>When the workflow with Object ID 101609 is launched, the log file is limited to a maximum of 10 MB and will retain 10 files.
- Save and close the file. No restart required. The new logging will be used the next time the workflow is launched.
Comments
0 comments
Please sign in to leave a comment.