The following classes include methods for logging:
•CustomItem—Includes the logging methods for code that extends CustomItem, which means automated qualifiers, automated actions, custom screens, and custom tools.
•Platform—Includes the logging methods for code that does not extend CustomItem.
Both classes include the same logging methods at the following logger levels:
•Debug
ologDebug(String message)
ologDebug(String message, Throwable t)
•Info
ologInfo(String message)
ologInfo(String message, Throwable t)
•Warn
ologWarn(String message)
ologWarn(String message, Throwable t)
•Error
ologError(String message)
ologError(String message, Throwable t)
The following code includes examples of methods that log messages:
String username = "username"; Date time = new Date();
// Log some debugging information logDebug("rule executed by " + username + " at " + time); // Also possible via Platform platform.logDebug("rule executed by " + username + " at " + time);
// Log an informational message logInfo("rule executed by " + username + " at " + time); // Also possible via Platform
// Log a warning logWarn("Missing some information"); // Also possible via Platform platform.logWarn("Missing some information");
// Log an error logError("This is a problem"); // Also possible via Platform platform.logError("This is a problem"); |