Class Logging

Class Documentation

class Logging

Base class for all security logging plugins.

Public Functions

Logging()
virtual ~Logging() = default
bool set_log_options(const LogOptions &log_options, SecurityException &exception)

set_log_options

Parameters
  • log_options

  • exception

Returns

TRUE if successful

bool get_log_options(LogOptions &log_options, SecurityException &exception) const

get_log_options

Parameters
  • log_options

  • exception

Returns

bool enable_logging(SecurityException &exception)

enable_logging

bool set_listener(LoggerListener *listener, SecurityException &exception)

set_listener

Parameters
  • listener

  • exception

Returns

void log(const LoggingLevel log_level, const std::string &message, const std::string &category, SecurityException &exception) const

log

Parameters
  • log_level

  • message

  • category

  • exception

inline bool options_set() const

Whether the options are set or not.

Returns

True if the options are set.

inline bool enabled() const

Whether the logging is enabled or not.

Returns

True if the logging is enabled.

inline LoggerListener const *get_listener() const

Return the LoggerListener.

Returns

A pointer to the (const) LoggerListener.

bool set_guid(const GUID_t &guid, SecurityException &exception)
bool set_domain_id(const uint32_t id, SecurityException &exception)

Protected Functions

inline virtual bool enable_logging_impl(SecurityException&)

enable_logging_impl

Returns

virtual bool convert(const LoggingLevel log_level, const std::string &message, const std::string &category, BuiltinLoggingType &builtin_msg, SecurityException &exception) const

convert

Parameters
  • log_level

  • message

  • category

  • builtin_msg

  • exception

Returns

template<typename Stream>
bool compose_header(Stream &header, const BuiltinLoggingType &builtin_msg, SecurityException &exception) const
virtual void log_impl(const BuiltinLoggingType &message, SecurityException &exception) const = 0

log_impl

Parameters
  • message

  • exception