Guitarix
Loading...
Searching...
No Matches
GxLogger Class Reference

#include <gx_logging.h>

Inheritance diagram for GxLogger:

Classes

struct  logmsg

Public Types

enum  MsgType { kInfo , kWarning , kError , kMessageTypeCount }

Public Member Functions

void unplug_queue ()
msg_signalsignal_message ()
void print (const char *func, const std::string &msg, MsgType msgtype)
void print (const std::string &formatted_msg, MsgType msgtype)

Static Public Member Functions

static GxLoggerget_logger ()
static void destroy ()

Private Types

typedef sigc::signal< void, const std::string &, MsgType, bool > msg_signal

Private Member Functions

std::string format (const char *func, const std::string &msg)
void set_ui_thread ()
 GxLogger ()
 ~GxLogger ()
void write_queued ()

Private Attributes

std::list< logmsg * > msglist
boost::mutex msgmutex
Glib::Dispatcher * got_new_msg
pthread_t ui_thread
msg_signal handlers
bool queue_all_msgs

Friends

class GxLoggerGuard

Detailed Description

Definition at line 35 of file gx_logging.h.

Member Typedef Documentation

◆ msg_signal

typedef sigc::signal<void, const std::string&, MsgType, bool> GxLogger::msg_signal
private

Definition at line 44 of file gx_logging.h.

Member Enumeration Documentation

◆ MsgType

Enumerator
kInfo 
kWarning 
kError 
kMessageTypeCount 

Definition at line 37 of file gx_logging.h.

Constructor & Destructor Documentation

◆ GxLogger()

GxLogger::GxLogger ( )
private

Referenced by get_logger().

◆ ~GxLogger()

GxLogger::~GxLogger ( )
private

Member Function Documentation

◆ destroy()

void GxLogger::destroy ( )
static

◆ format()

std::string GxLogger::format ( const char * func,
const std::string & msg )
private

◆ get_logger()

GxLogger & GxLogger::get_logger ( )
static

◆ print() [1/2]

void GxLogger::print ( const char * func,
const std::string & msg,
MsgType msgtype )

◆ print() [2/2]

void GxLogger::print ( const std::string & formatted_msg,
MsgType msgtype )

◆ set_ui_thread()

void GxLogger::set_ui_thread ( )
private

◆ signal_message()

msg_signal & GxLogger::signal_message ( )

◆ unplug_queue()

void GxLogger::unplug_queue ( )

◆ write_queued()

void GxLogger::write_queued ( )
private

◆ GxLoggerGuard

friend class GxLoggerGuard
friend

Definition at line 62 of file gx_logging.h.

Referenced by GxLoggerGuard.

Member Data Documentation

◆ got_new_msg

Glib::Dispatcher* GxLogger::got_new_msg
private

Definition at line 53 of file gx_logging.h.

◆ handlers

msg_signal GxLogger::handlers
private

Definition at line 55 of file gx_logging.h.

◆ msglist

std::list<logmsg*> GxLogger::msglist
private

Definition at line 51 of file gx_logging.h.

◆ msgmutex

boost::mutex GxLogger::msgmutex
private

Definition at line 52 of file gx_logging.h.

◆ queue_all_msgs

bool GxLogger::queue_all_msgs
private

Definition at line 56 of file gx_logging.h.

◆ ui_thread

pthread_t GxLogger::ui_thread
private

Definition at line 54 of file gx_logging.h.


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