Freya  0.0.1
A Gtk3 MPD Client
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
Log::Writer Class Reference

#include <Writer.hh>

Public Member Functions

 ~Writer ()
 Closes the Log also properly. It is not fatal when not being called.
void message (const char *file, int line, LOGLEVEL level, const char *msg,...)
 Actual instance method called. Do not use directly!
void set_verbosity (LOGLEVEL v)
 Set the max. verbosity.
LOGLEVEL get_verbosity ()
 Get the currently set verbosity level.
void clear ()
 Clear the logfile (but keep it open)

Detailed Description

Definition at line 67 of file Writer.hh.


Constructor & Destructor Documentation

Closes the Log also properly. It is not fatal when not being called.


Member Function Documentation

Clear the logfile (but keep it open)

Get the currently set verbosity level.

Returns:
a member of the LOGLEVEL enum
void Log::Writer::message ( const char *  file,
int  line,
LOGLEVEL  level,
const char *  msg,
  ... 
)

Actual instance method called. Do not use directly!

Parameters:
filePassed by the macro.
linePassed by the macro.
levelSeveritylevel
msgActual message
...a va_list to allow printf style logging

Set the max. verbosity.

LOG_DEBUG is the highest level, LOG_FATAL_ERROR the lowest, the priority can be read from the LOGLEVEL enum above, to diasable logging completely you may pass 0.

Parameters:
va member of the LOGLEVEL enum

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