Logging of custom ETLs

The Log class included in the ETL Development API enables the logging feature in ETL. Generally, log messages are saved in a log (.txt) file and also in the TrueSight Capacity Optimization database. Every ETL execution creates a log that can be viewed from the Console.

A typical log entry has the following structure:

  • Type of message
    • ERROR: An error message.
    • WARNING: An attention message.
    • INFO: Information about processing.
    • REPORT: Important, but non-critical information that is to be reported.
  • The message text.
  • Log level: A number between 1 and 10, used to filter out verbose logging in production environments.

Log levels

Log level filtering is driven by the general.log.level configuration property, that states the maximum log level at which a message is logged; messages with a higher level are ignored. For example, if general.log.level is set to 10, a message at level 30 will be ignored.

Generally, debugging messages are set at level 100 (the highest log level) and other important information at level 1 (the lowest log level). Intermediate levels can be set depending on the particular ETL.

Each method in Log is static, and is used to set a different message type. The following table lists these methods:

Message Type

Method

INFO

Log.put

WARNING

Log.warning

ERROR

Log.err

REPORT

Log.report

Example

  • A level 1 message –
    Log.put("This is important information!",1);
  • A level 10 message –
    Log.put("This is verbose information.",10);
  • An Error message –
    Log.err("This is an error!",1);

Note

Every time an ERROR occurs, an alert E-mail is sent to the TrueSight Capacity Optimization administrator.

Was this page helpful? Yes No Submitting... Thank you

Comments