Logging in Pentaho Jobs

Today , i will discuss about the logging in Pentaho jobs which actually helps the production support team to analyze/identify the issue in less time post . First  thing , in order to create the logs for the ETL jobs, right click on job and go to Edit and go to 3rd tab (logging settings).

  1. Check the check box “Specify log file”
  2. If you want to append the log file, Check the box “Append logfile”.
  3. Then comes the “Name of the logfile”, specify the variables and place their values in kettle.properties. See the below image for the same.
  4. Select Basic as “LogLevel”
  5. You can check the date and time checkbox if you need date and timestamp in the logfile.
  6. Give the name to the “Extension of the logfile” like log or txt or csv.

 

You can mention the value of variables (LOG_FILE_PATH and LOG_FILE_NAME) in kettle.properties. Once you trigger the job , logs will start generating at particular path and name.

Second thing is that ETL developer should use  “Write to log” component effectively.  This component is present in both Transformation and Job. You can use this component to display the value of any variable or convey any message  regarding the status of currently running ETL job. See the below image for the same.

 

Related posts