shawn::SimulationTaskLoggingReconfigure Class Reference

Task reconfiguring logging libraries at runtime. More...

#include <logging_task_reconfigure.h>

Inheritance diagram for shawn::SimulationTaskLoggingReconfigure:

Inheritance graph
[legend]
Collaboration diagram for shawn::SimulationTaskLoggingReconfigure:

Collaboration graph
[legend]

List of all members.

Public Member Functions

construction / destruction
 SimulationTaskLoggingReconfigure ()
virtual ~SimulationTaskLoggingReconfigure ()
basic task methods
virtual void run (SimulationController &) throw ( std::runtime_error )
virtual std::string name (void) const throw ()
virtual std::string description (void) const throw ()


Detailed Description

Task reconfiguring logging libraries at runtime.

This task allows reconfiguring logging libraries at runtime.

Just type one of the following exemplary lines to reconfigure logging.

    logging_reconfigure action=set_level logger=MyLoggerName level=[debug,info,...,fatal]
    logging_reconfigure action=set_additivity logger=MyLoggerName additivity=[true|false]

Moreover, by using log4cxx, there is the chance a add/remove different appenders (up to now rm_appenders removes all appenders.).

    logging_reconfigure action=rm_appender logger=MyLoggerName
    logging_reconfigure action=add_appender \
       logger=MyLoggerName                  \
       appender=Appender1,Appender2,... (whereby AppenderX=[ConsoleAppender|FileAppender]) \
       layout=[SimpleLayout|TTCCLayout|StdLayout|StdUserLayout|XMLLayout]     \
       append=[true|false] logfile=Filename (these ones are just used by FileAppender)

Attention: Reconfiguration just works with the external logging libraries log4cxx and log4cplus. If you use internal logging functions reconfiguring will not have any effect. The only way to influence internal logging is defining DISABLE_LOGLEVEL_DEBUG or DISABLE_LOGLEVEL_INFO.


Constructor & Destructor Documentation

shawn::SimulationTaskLoggingReconfigure::SimulationTaskLoggingReconfigure (  ) 

virtual shawn::SimulationTaskLoggingReconfigure::~SimulationTaskLoggingReconfigure (  )  [virtual]


Member Function Documentation

virtual void shawn::SimulationTaskLoggingReconfigure::run ( SimulationController  )  throw ( std::runtime_error ) [virtual]

Main function which is called when starting this task. This case, methods reconfiguring logging libraries are called.

Parameters:
SimulationController enables access to whole simulation
See also:
SimulationTask::run()

Implements shawn::SimulationTask.

virtual std::string shawn::SimulationTaskLoggingReconfigure::name ( void   )  const throw () [virtual]

Returns:
Name of task. This case logging_reconfigure
See also:
KeeperManaged::name()

Implements shawn::KeeperManaged.

virtual std::string shawn::SimulationTaskLoggingReconfigure::description ( void   )  const throw () [virtual]

Returns:
Description of task.
See also:
KeeperManaged::description()

Implements shawn::KeeperManaged.


The documentation for this class was generated from the following file:

Generated on Tue Feb 7 00:00:56 2012 for Shawn by  doxygen 1.5.6