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

  1. In the service references under "servicerefs" element in ServiceDescriptor.xml, make the following changes:

  2. Add the following log module under "logmodules" element 

  3. Make the folowing chnages to the respective elements below:

    Changes Required
    Logging.javaAdd 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.javaAdd 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.javaAdd 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.
  • To check the functionality of this component, it should be registered with the server.
  • The steps to register the samples is specified in the Sample Templates section.
Adaptavist ThemeBuilder EngineAtlassian Confluence