20 #ifndef LOGGING_IMPL_H 21 #define LOGGING_IMPL_H 22 #include <boost/shared_ptr.hpp> 23 #include <boost/make_shared.hpp> 24 #include <boost/ref.hpp> 25 #include "ossie/CF/LogInterfaces.h" 26 #include "ossie/logging/rh_logger.h" 27 #include "ossie/logging/loghelpers.h" 28 #include "ossie/EventChannelSupport.h" 29 #include "ossie/Autocomplete.h" 32 #ifdef BEGIN_AUTOCOMPLETE_IGNORE
33 :
public virtual POA_CF::Logging
56 void log_level(
const CF::LogLevel newLevel );
59 void setLogLevel(
const char *logger_id,
const CF::LogLevel newLevel )
throw (CF::UnknownIdentifier);
65 LOGGER
getLogger(
const std::string &logger_name,
const bool assignToResource=
false);
73 CORBA::ULong startingRecord );
75 CORBA::ULongLong to_timeStamp );
77 CORBA::ULongLong from_timeStamp );
104 void setLoggingContext(
const std::string &url,
int loglevel, ossie::logging::ResourceCtxPtr ctx );
112 void saveLoggingContext(
const std::string &url,
int loglevel, ossie::logging::ResourceCtxPtr ctx );
130 virtual void operator() (
const char *logid,
const CF::LogLevel &level ) = 0;
142 typedef boost::shared_ptr< MemberLogLevelListener< T > >
SPtr;
144 typedef void (T::*
MemberFn)(
const char *logid,
const CF::LogLevel &level );
150 virtual void operator() (
const char *logid,
const CF::LogLevel &level )
152 (target_.*func_)(logid, level);
172 virtual void operator() (
const char *logid,
const CF::LogLevel &level )
174 (*func_)(logid, level);
195 virtual void operator() (
const char *config_data ) = 0;
207 typedef boost::shared_ptr< MemberLogConfigListener< T > >
SPtr;
209 typedef void (T::*
MemberFn)(
const char *config_data );
217 (target_.*func_)(config_data);
239 (*func_)(config_data);
258 template<
typename T >
inline 260 logConfigCallback = boost::make_shared< MemberLogConfigListener< T > >( boost::ref(target), func );
263 template<
typename T >
inline 265 logConfigCallback = boost::make_shared< MemberLogConfigListener< T > >( boost::ref(*target), func );
268 template<
typename T >
inline 270 logLevelCallback = boost::make_shared< MemberLogLevelListener< T > >( boost::ref(target), func );
273 template<
typename T >
inline 275 logLevelCallback = boost::make_shared< MemberLogLevelListener< T > >( boost::ref(*target), func );
299 std::string _logCfgContents;
301 std::string _logCfgURL;
303 ossie::logging::ResourceCtxPtr _loggingCtx;
306 boost::shared_ptr< ossie::events::PushEventConsumer > logConfigChannel;
309 LogConfigListenerPtr logConfigCallback;
312 LogLevelListenerPtr logLevelCallback;
CF::LogLevel _logLevel
Definition: Logging_impl.h:288
std::string _logName
Definition: Logging_impl.h:285
virtual void operator()(const char *config_data)
Definition: Logging_impl.h:215
Definition: Logging_impl.h:139
void(* LogConfigCallbackFn)(const char *config_data)
Definition: Logging_impl.h:119
Definition: Logging_impl.h:204
void setLogLevelListener(T *target, void(T::*func)(const char *logid, const CF::LogLevel &level))
Definition: Logging_impl.h:274
void setLogConfig(const char *config_contents)
ossie::logging::MacroTable _loggingMacros
Definition: Logging_impl.h:294
boost::shared_ptr< LogLevelListener > LogLevelListenerPtr
Definition: Logging_impl.h:256
void setLogLevelListener(T &target, void(T::*func)(const char *logid, const CF::LogLevel &level))
Definition: Logging_impl.h:269
void(T::* MemberFn)(const char *logid, const CF::LogLevel &level)
Definition: Logging_impl.h:144
void setLoggingContext(ossie::logging::ResourceCtxPtr ctx)
void setLogConfigListener(T &target, void(T::*func)(const char *config_data))
Definition: Logging_impl.h:259
MemberLogLevelListener(T &target, MemberFn func)
Definition: Logging_impl.h:156
boost::shared_ptr< MemberLogConfigListener< T > > SPtr
Definition: Logging_impl.h:207
StaticLogConfigListener(LogConfigCallbackFn func)
Definition: Logging_impl.h:242
CF::LogEventSequence * retrieve_records_by_date(CORBA::ULong &howMany, CORBA::ULongLong to_timeStamp)
LOGGER _logger
Definition: Logging_impl.h:291
virtual void setLogConfigCallback(LogConfigListener *func)
CF::LogEventSequence * retrieve_records_from_date(CORBA::ULong &howMany, CORBA::ULongLong from_timeStamp)
void saveLoggingContext(const std::string &url, int loglevel, ossie::logging::ResourceCtxPtr ctx)
virtual void operator()(const char *config_data)=0
Definition: Logging_impl.h:31
virtual void setLogLevelCallback(LogLevelListener *func)
void setResourceContext(ossie::logging::ResourceCtxPtr ctx)
virtual ~LogConfigListener()
Definition: Logging_impl.h:196
void setLogLevel(const char *logger_id, const CF::LogLevel newLevel)
static SPtr Create(T &target, MemberFn func)
Definition: Logging_impl.h:146
void setLogConfigListener(T *target, void(T::*func)(const char *config_data))
Definition: Logging_impl.h:264
void(T::* MemberFn)(const char *config_data)
Definition: Logging_impl.h:209
virtual void operator()(const char *logid, const CF::LogLevel &level)=0
boost::shared_ptr< MemberLogLevelListener< T > > SPtr
Definition: Logging_impl.h:142
StaticLogLevelListener(LogLevelCallbackFn func)
Definition: Logging_impl.h:177
CF::LogEventSequence * retrieve_records(CORBA::ULong &howMany, CORBA::ULong startingRecord)
Definition: Logging_impl.h:169
virtual ~LogLevelListener()
Definition: Logging_impl.h:131
boost::shared_ptr< LogConfigListener > LogConfigListenerPtr
Definition: Logging_impl.h:255
virtual ~Logging_impl()
Definition: Logging_impl.h:40
void setLoggingMacros(ossie::logging::MacroTable &tbl, bool applyCtx)
Definition: Logging_impl.h:192
MemberLogConfigListener(T &target, MemberFn func)
Definition: Logging_impl.h:221
Definition: Logging_impl.h:234
virtual void operator()(const char *config_data)
Definition: Logging_impl.h:237
void setLogConfigURL(const char *config_url)
void(* LogLevelCallbackFn)(const char *logid, const CF::LogLevel &)
Definition: Logging_impl.h:121
Definition: Logging_impl.h:127
virtual void operator()(const char *logid, const CF::LogLevel &level)
Definition: Logging_impl.h:172
static SPtr Create(T &target, MemberFn func)
Definition: Logging_impl.h:211
virtual void operator()(const char *logid, const CF::LogLevel &level)
Definition: Logging_impl.h:150