23#ifndef _PLUGINS_MONGODB_MONGODB_LOGGER_THREAD_H_
24#define _PLUGINS_MONGODB_MONGODB_LOGGER_THREAD_H_
26#include <aspect/clock.h>
27#include <aspect/configurable.h>
28#include <aspect/logger.h>
29#include <aspect/logging.h>
30#include <core/threading/thread.h>
31#include <plugins/mongodb/aspect/mongodb.h>
55 virtual void log_debug(
const char *component,
const char *format, ...);
56 virtual void log_info(
const char *component,
const char *format, ...);
57 virtual void log_warn(
const char *component,
const char *format, ...);
58 virtual void log_error(
const char *component,
const char *format, ...);
60 virtual void vlog_debug(
const char *component,
const char *format, va_list va);
61 virtual void vlog_info(
const char *component,
const char *format, va_list va);
62 virtual void vlog_warn(
const char *component,
const char *format, va_list va);
63 virtual void vlog_error(
const char *component,
const char *format, va_list va);
70 virtual void tlog_debug(
struct timeval *t,
const char *component,
const char *format, ...);
71 virtual void tlog_info(
struct timeval *t,
const char *component,
const char *format, ...);
72 virtual void tlog_warn(
struct timeval *t,
const char *component,
const char *format, ...);
73 virtual void tlog_error(
struct timeval *t,
const char *component,
const char *format, ...);
81 vtlog_debug(
struct timeval *t,
const char *component,
const char *format, va_list va);
82 virtual void vtlog_info(
struct timeval *t,
const char *component,
const char *format, va_list va);
83 virtual void vtlog_warn(
struct timeval *t,
const char *component,
const char *format, va_list va);
85 vtlog_error(
struct timeval *t,
const char *component,
const char *format, va_list va);
96 void insert_message(
LogLevel ll,
const char *component,
const char *format, va_list va);
98 void tlog_insert_message(
LogLevel ll,
100 const char * component,
107 std::string database_;
108 std::string collection_;
Thread that provides a logger writing to MongoDB.
virtual void vtlog_info(struct timeval *t, const char *component, const char *format, va_list va)
Log informational message for specific time.
virtual void log_warn(const char *component, const char *format,...)
Log warning message.
MongoLogLoggerThread()
Constructor.
virtual void vtlog_warn(struct timeval *t, const char *component, const char *format, va_list va)
Log warning message for specific time.
virtual void log_info(const char *component, const char *format,...)
Log informational message.
virtual void log_debug(const char *component, const char *format,...)
Log debug message.
virtual void init()
Initialize the thread.
virtual void loop()
Code to execute in the thread.
virtual void finalize()
Finalize the thread.
virtual ~MongoLogLoggerThread()
Destructor.
virtual void tlog_warn(struct timeval *t, const char *component, const char *format,...)
Log warning message for specific time.
virtual void vtlog_error(struct timeval *t, const char *component, const char *format, va_list va)
Log error message for specific time.
virtual void log_error(const char *component, const char *format,...)
Log error message.
virtual void vlog_error(const char *component, const char *format, va_list va)
Log error message.
virtual void tlog_info(struct timeval *t, const char *component, const char *format,...)
Log informational message for specific time.
virtual void vtlog_debug(struct timeval *t, const char *component, const char *format, va_list va)
Log debug message for specific time.
virtual void run()
Stub to see name in backtrace for easier debugging.
virtual void vlog_debug(const char *component, const char *format, va_list va)
Log debug message.
virtual void tlog_error(struct timeval *t, const char *component, const char *format,...)
Log error message for specific time.
virtual void vlog_info(const char *component, const char *format, va_list va)
Log informational message.
virtual void tlog_debug(struct timeval *t, const char *component, const char *format,...)
Log debug message for specific time.
virtual void vlog_warn(const char *component, const char *format, va_list va)
Log warning message.
Thread aspect that allows to obtain the current time from the clock.
Thread aspect to access configuration data.
Base class for exceptions in Fawkes.
Thread aspect that allows to provide a logger to Fawkes.
Thread aspect to log output.
Thread aspect to access MongoDB.
Mutex mutual exclusion lock.
Thread class encapsulation of pthreads.
Fawkes library namespace.