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 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: