Functionality
This component shows how the logger can be obtained and used to log the events/exceptions.
Default Behaviour
By default, the component logs the message received on the input port and sends the same onto the output port.
Changes required for Logging
In the service references under "servicerefs" element in ServiceDescriptor.xml, make the following changes:
AddRemoveAdd the following log module under "logmodules" element
Make the folowing chnages to the respective elements below:
ElementsChanges RequiredLogging.java Add field Logger logger;
MOdify the void start(String[] args) method to obtain Fiorano specific Logger object.
Modify initialization of 'jmsObjects' by sending the logger to the constructor.
Modify the void stop() method to log the exceptions.JMSObjects.java Add field Logger logger;
Modify the constructor to initialize the logger object;
Modify the void create() method to log the events.
Modify the void cleanup() method to log the exceptions.LoggingMessageListener.java Add field Logger logger;
Modify the constructor to initialize the logger object.
Modify the void onMessage(Message) method to handle the default behaviour of the component.
Overview
Content Tools
ThemeBuilder