This class provides methods to support the logging functionality of FlowPDF. This class gets loaded by FlowPDF, before other components get initialized.
- A few points to note about logging.
-
-
The log level which is retrieved from the debugLevel property in the configuration, control which messages get written to the logs.
-
+ The Methods provided by this class facilitate the classification of a
- message into any one of the following.
-
-
Log
-
Debug
-
Trace
-
Warning
-
Error
-
-
The log level and the classification of messages work together to surface the severity of a message.
-
Regardless of the log level Warning and Error Messages will always be written.
-
Logged messages are appropriately prefaced by [DEBUG], [TRACE], [WARNING], [ERROR] based on their classification.
-
It supports the following log levels:
-
INFO
This is the default level.
debugLevel property should be set to 0.
-
DEBUG
Provides the same output from INFO level + debug output.
debugLevel property should be set to 1.
-
TRACE
Provides the same output from DEBUG level + TRACE output.
debugLevel property should be set to 2.
To import FlowPDF::Log do the following.
use FlowPDF::Log
All the following methods get loaded in current scope upon import.
logError(@messages)
Logs an error message
Usage
# This message will be written always (irrespective of the log level). logError("This is an error message");
logInfoDiag(@messages)
This function works exactly as logInfo, but adds additional markups into log. Then this info will be displayed at Diagnostic tab of a job.