The CloverETL Server uses the log4j library for logging.
The WAR file contains the default log4j configuration.
The log4j configuration file log4j.xml
is placed in WEB-INF/classes
directory.
By default, log files are produced in the directory specified by
system property "java.io.tmpdir" in the cloverlogs
subdirectory.
"java.io.tmpdir" usually contains common system temp dir i.e. /tmp
.
On Tomcat, it is usually $TOMCAT_HOME/temp
The default logging configuration (log4j.xml bundled in the clover.war) may be changed to another log4j configuration file using system property
log4j.configuration
.
If you override the configuration, only the properties from the new file are used.
The log4j.configuration
should contain the URL of the a new log4j configuration file.
It's not just file system path, it must be URL, so it may look like this:
log4j.configuration=file:/home/clover/config/log4j.xml
It is better to copy the original file and modify the copy, than to create a new one.
Please note, that "log4j.configuration" is not a CloverETL Server config property, but system property, thus it must be set on the JVM command line by -Dlog4j.configuration or in other way suitable for the application container.
Best possibility how to set a system property for each application container is described in the "Installation" chapter.
Since such a configuration overrides the default configuration, it may
have influence over Graph run logs. So your own log config has to contain
following fragment to preserve Graph run logs
<logger name="Tracking" additivity="false">
<level value="debug"/>
</logger>
Access Log in Apache Tomcat
If you need to log all requests processed by server, add the following code to $CATALINA_HOME/conf/server.xml
.
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t %D %r %s %b" />
The format defined above has following meaning
[IP address] [date-time] [processing duration in millis] [method] [URL] [protocol+version] [response code] [response size]
The log will look like the next line
172.17.30.243 - - [13/Nov/2014:12:53:03 +0000] 2 "POST /clover/sDispatcher/clusterNodeApi HTTP/1.1" 200 1435"
Each graph or jobflow run has its own log file – for example, in the
Server Console, section "Executions History".
By default, these log files are saved in the subdirectory cloverLogs/graph
in the directory specified by "java.io.tmpdir" system property.
It’s possible to specify a different location for these logs with the
CloverETL "graph.logs_path" property.
This property does not influence main Server logs.
Server Audit Log logs operations called on ServerFacade and JDBC proxy interfaces.
Audit logging can be enabled by setting (adding)
the value of CloverETL property logging.logger.server_audit.enabled
to true.
In server GUI, you can change the property value in
→ → .
Audit logging is disabled by default.
The name of output file is server-audit.log
.
The file is in the same directory as main server log files.
Default log level is DEBUG, so all operations which may do any change or another important operations (e.g. login or openJdbcConnection) are logged.
To enable logging of all operations, change log level to TRACE in the log4j configuration.
Each logged operation is logged by two messages: entering method and exiting method (if the exception is raised, it's logged instead of output parameters)
- Entering method (marked as "inputParams"). All method's parameters (except for passwords) are printed.
- Exiting method (marked as "outputParams"). Method's return value is printed.
- Exception in method (marked as "EXCEPTION"). Exception's stacktrace is printed.
Message also contains:
- username, if the user is known
- client IP address, if it's known
- cluster node ID
- Interface name and the operation name
Values of transient and lazy initialized (in entity classes) fields and fields with binary content are not printed.