Palladio Workflow Engine/Logging

Aus SDQ-Wiki
Wechseln zu: Navigation, Suche

The workflow engine implements and provides a specific logger which enables to log on the console of the active Eclipse instance. Because this is an UI related feature, the implementation of this logging is located in the plugin de.uka.ipd.sdq.workflow.launchconfig.

This logging framework sets up a logger coupled to the package "de.uka.ipd.sdq.workflow". However, custom jobs and job extension (see below) are granted access to a pre-initialized logger. The class OrderPreservingCompositeJob initializes this logger. The abstract class for extension jobs also extends the OrderPreservingCompositeJob.

If your custom job exends either OrderPreservingCompositeJob or AbstractWorkflowExtensionJob, you can directly call the logger such as:
logger.warn("Hello World");
logger.error(" World");

Note: As soon as you initialize an own logger (e.g., by calling Logger logger = Logger.getLogger(MyClass.class);) you get a logger which might not be located in the package "de.uka.ipd.sdq.workflow" and for this, no valid appender is initialized for you by the WorkflowEngine.