This repository has been archived by the owner on Dec 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
RedDeer logging system
jpeterka edited this page May 21, 2015
·
16 revisions
Logging in RedDeer is similar to any other logging system like log4j with some differences. On the one hand it is much more simple and doesn't require any xml configuration. On the other hand it doesn't provide as fine and complex possibilities as log4j does. It also brings some additional logging types which are not available in log4j and which are handy for UI testing.
When you want to use the logger in your your class you just must define Logger from org.jboss.reddeer.common.logging package.
private final Logger log = Logger.getLogger(WorkbenchPreferenceDialog.class);
then you can log your messages by using the logger
log.info("Server " + serverName + " is started");
Log message type | Usage description |
---|---|
FATAL | fatal message are mostly for reporting halt state or other serious issue |
ERROR | error message for reporting any unexpected state and errors |
DUMP | should be used after error message to provide additional useful information related to the error |
STEP | describes hi-level test steps describing high level test flow, should used only in test class |
WARN | any warning message which indicates anything outside normal state |
INFO | general type for information type messages |
DEBUG | low-level debug information usable for analyzing issues and bugs |
TRACE | low-level trace information that indicates tracking through the code |
There are these log filter switches that can be used to filter your log for message type or message level according to your needs.
Parameter | Default value | Type | Description | Source |
---|---|---|---|---|
logMessageFilter | ALL | pipe separated string | filters log messages according to settings. Possible | |
logLevel | ALL | string | filters log messages according to settings. Possible values are none,trace,debug,error,warn,info,step,error,fatal,all . Values are case insensitive |
ExecutionSettings |