#include <TaskServices.h>
Public Member Functions | |
TaskServices () | |
virtual | ~TaskServices () |
virtual Logging::Logger::LoggerSmartPtr | getLogger () |
Private Attributes | |
Logging::Logger::LoggerSmartPtr | m_logger |
1) Add the following to your code which initializes things (top of main() for example): #include <loggingGenericLogger.h>
if (Logging::Logger::getGlobalLogger() == 0) { Logging::Logger::setGlobalLogger(new Logging::GenericLogger(Logging::BaseLog::GLOBAL_LOGGER_NAME)); }
Another option is to set the global Logger to be a subclass of Logger that you have written.
2) link with the baselogging library instead of the logging library (or instead of the parameterTask library which links with the logging library)
In so doing, you would then be completely decoupled from ACE/TAO for the purposes of logging.
So, to summarize:
-> To use this class in an ACS-aware manner, you need only to link with the parameterTask library (or the logging library) and use the standard ACS_XYZ logging macros.
-> To use this class in an ACS-decoupled manner, you must avoid linking with parameterTask (and/or the logging library), instead linking with the baselogging library and setting your own global logger using the Logging::Logger::setGlobalLogger static method. Additionally, you will currently be limited to using macros defined in loggingMACROS.h.
|
Constructor, which creates the logger. |
|
Destructor, which must be virtual. |
|
The method to acquire a logger for the task. |
|
|