PlankServicesLogger

PlankServicesLogger — A logging class to display all console messages in a nice colored format.

Synopsis

#define             PLANK_SERVICES_TYPE_LOGGER
PlankServicesLogLevel plank_services_logger_get_DisplayLevel
                                                        (void);
void                plank_services_logger_set_DisplayLevel
                                                        (PlankServicesLogLevel value);
void                plank_services_logger_initialize    (const gchar *app_name);
void                plank_services_logger_notification  (const gchar *msg,
                                                         const gchar *icon);
void                plank_services_logger_verbose       (const gchar *msg,
                                                         ...);
struct              PlankServicesLogger;
struct              PlankServicesLoggerClass;
enum                PlankServicesLogLevel;

Object Hierarchy

  GObject
   +----PlankServicesLogger
  GEnum
   +----PlankServicesLogLevel

Description

Details

PLANK_SERVICES_TYPE_LOGGER

#define PLANK_SERVICES_TYPE_LOGGER (plank_services_logger_get_type ())

The type for PlankServicesLogger.


plank_services_logger_get_DisplayLevel ()

PlankServicesLogLevel plank_services_logger_get_DisplayLevel
                                                        (void);

Get and return the current value of the "DisplayLevel" property.

The current log level. Controls what log messages actually appear on the console.

self :

the PlankServicesLogger instance to query

Returns :

the value of the "DisplayLevel" property

plank_services_logger_set_DisplayLevel ()

void                plank_services_logger_set_DisplayLevel
                                                        (PlankServicesLogLevel value);

Set the value of the "DisplayLevel" property to value.

The current log level. Controls what log messages actually appear on the console.

self :

the PlankServicesLogger instance to modify

value :

the new value of the "DisplayLevel" property

plank_services_logger_initialize ()

void                plank_services_logger_initialize    (const gchar *app_name);

Initializes the logger for the application.

app_name :

 . the name of the application. [in]

plank_services_logger_notification ()

void                plank_services_logger_notification  (const gchar *msg,
                                                         const gchar *icon);

Displays a log message using libnotify. Also displays on the console.

msg :

 . the log message to display. [in]

icon :

 . the icon to display in the notification. [in]

plank_services_logger_verbose ()

void                plank_services_logger_verbose       (const gchar *msg,
                                                         ...);

Displays a verbose log message to the console.

msg :

 . the log message to display. [in]

... :

 

struct PlankServicesLogger

struct PlankServicesLogger;

A logging class to display all console messages in a nice colored format.


struct PlankServicesLoggerClass

struct PlankServicesLoggerClass {
	GObjectClass parent_class;
};

The class structure for PLANK_SERVICES_TYPE_LOGGER. All the fields in this structure are private and should never be accessed directly.

GObjectClass parent_class;

the parent class structure

enum PlankServicesLogLevel

typedef enum {
	PLANK_SERVICES_LOG_LEVEL_VERBOSE,
	PLANK_SERVICES_LOG_LEVEL_DEBUG,
	PLANK_SERVICES_LOG_LEVEL_INFO,
	PLANK_SERVICES_LOG_LEVEL_NOTIFY,
	PLANK_SERVICES_LOG_LEVEL_WARN,
	PLANK_SERVICES_LOG_LEVEL_ERROR,
	PLANK_SERVICES_LOG_LEVEL_FATAL
} PlankServicesLogLevel;

Controls what messages show in the console log.

PLANK_SERVICES_LOG_LEVEL_VERBOSE

Extra debugging info. A *LOT* of messages.

PLANK_SERVICES_LOG_LEVEL_DEBUG

Debugging messages that help track what the application is doing.

PLANK_SERVICES_LOG_LEVEL_INFO

General information messages. Similar to debug but perhaps useful to non-debug users.

PLANK_SERVICES_LOG_LEVEL_NOTIFY

Messages that also show a libnotify message.

PLANK_SERVICES_LOG_LEVEL_WARN

Any messsage that is a warning.

PLANK_SERVICES_LOG_LEVEL_ERROR

Any message considered an error. These can be recovered from but might make the application function abnormally.

PLANK_SERVICES_LOG_LEVEL_FATAL

Any message considered fatal. These generally break the application.