Setting up the Logging parameters
About this task
In Talend Administration Center, there are two types of collected logs:
- the technical logs, that gather technical events like the status of connections and servers, and so on.
- the business logs, that gather all users' actions, like the creation, connection, deletion, and edition of a user, a Job and so on.
Those logs are collected by FileBeat and displayed on the Logging page thanks to the Kibana Web application whose URL needs to be configured in the Monitoring node of the Configuration page as explained in Setting up the link to the Monitoring modules. For more information about the extended logging module, see Displaying log events.
You can modify the log file paths and threshold. To do so, complete the following:
Procedure
- On the Menu tree view, click Configuration.
-
Click the Logs group to display its parameters.
Information noteNote: If the path to the three types of logs is not configured, all logs are stored by default in the Catalina logs at the following path: <tomcat_path>/webapps/org.talend.administrator/WEB-INF/class/log4j2.xml.
Parameter
Value
Technical file appender
Type in the path to the technical log file of Talend Administration Center.
The log file path containing a folder with the name conf or etc is invalid and you will not be able to download the log files successfully.
The specified folder must exist. For example, if you enter c:/logs/technical.log, the technical.log file will be created in the existing c:/logs folder. The log file contains technical information logged by classes on the Talend Administration Center runtime, for example task execution start information and so on. You can safely remove the log file.
Information noteNote: If no path has been set or if the path is invalid, the technical logs will be appended in Tomcat logs.Technical log threshold
Select the level of logs you want to append between DEBUG, INFO, WARN, and ERROR from the drop-down list.
Set technical log limit by Select from Time and File size and count for setting technical log rotation criteria. - Time: Set log rotation by days. When this option is selected, each file size will be 1MB and unlimited number of files will be created.
- File size and count: Set log rotation by file size and count.
Max. size per log file(MB) This option is available when File size and count is selected from the Set technical log limit by list. Set the maximum size of each technical log file. Only integer values between 1~N (within 6 characters) are allowed. Rotate logs after file number This option is available when File size and count is selected from the Set technical log limit by list. Set the number of technical log files for log rotation. Only integer values between 1~N (within 6 characters) are allowed. Rotate logs older than(in days) This option is available when Time is selected from the Set technical log limit by list. Set the maximum life time of technical log files in days. Only integer values between 1~N (within 6 characters) are allowed. Business log file path Type in the path to the business log file of Talend Administration Center.
The log file path containing a folder with the name conf or etc is invalid and you will not be able to download the log files successfully.
The specified folder must exist. For example, if you enter c:/logs/business.log, the business.log file will be created in the existing c:/logs folder. The log file contains business information logged by classes on the Talend Administration Center runtime, for example task or user create information and so on. You can safely remove the log file.
Information noteNote: If no path has been set or if the path is invalid, the business logs will not be recorded.Set business log limit by Select from Time and File size and count for setting business log rotation criteria. - Time: Set log rotation by days. When this option is selected, each file size will be 1MB and unlimited number of files will be created.
- File size and count: Set log rotation by file size and count.
Max size per log file(MB) This option is available when File size and count is selected from the Set business log limit by list. Set the maximum size of each business log file. Only integer values between 1~N (within 6 characters) are allowed. Rotate logs after file number This option is available when File size and count is selected from the Set business log limit by list. Set the number of business log files for log rotation. Only integer values between 1~N (within 6 characters) are allowed. Rotate logs older than(in days) This option is available when Time is selected from the Set business log limit by list. Set the maximum life time of business log files in days. Only integer values between 1~N (within 6 characters) are allowed. The format of the technical logs and the business logs follow the log4j Class PatternLayout. For more information see https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html. The conversion pattern %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1} %x - %m%n is used:Conversion Character
Effect
%d{yyyy-MM-dd HH:mm:ss}
Used to output the date of the logging event. The data format is yyyy-MM-dd HH:mm:ss, for example, 2018-02-07 18:58:15.
%-5p
Used to output the priority of the logging event. %-5p means the priority of the logging event should be left justified to a width of five characters, for example, INFO, WARN, DEBUG.
%c{1} Used to output the Class name.
%x
Used to output the NDC (nested diagnostic context) associated with the thread that generated the logging event.
%m
Used to output the application supplied message associated with the logging event.
%n
Outputs the platform dependent line separator character or characters.
A sample log 2018-03-14 09:36:17 DEBUG TokenRequiredPolicy - Checking token shows the following information:- datatime,
- log level,
- java class name,
- the log message, which should include the activity detail.
In order to display the JDBC query execution times (and thus, the time spent to connect to the database), it is possible to enable hibernate.generate_statistics logs:- Go to <Tomcat_home>\webapps\org.talend.administrator\WEB-INF\classes and open configuration.properties file. Set the following parameter: hibernate.generate_statistics=true.
- Go to <Tomcat_home>\webapps\org.talend.administrator\WEB-INF\classes and open log4j.xml file. Set the debug level for the following folders: "org.hibernate.SQL", "org.hibernate.HQL", "org.hibernate.stat" and "org.hibernate.engine.internal.StatisticalLoggingSessionEventListener".
- Restart Talend Administration Center.
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!