Logging

Logging — Logging Routines

Functions

void goa_log ()
#define goa_debug()
#define goa_info()
#define goa_notice()
#define goa_warning()
#define goa_error()

Types and Values

Object Hierarchy


Description

TODO: explain a bit more what these logging routines do - e.g. that GOA_LOG_LEVEL_NOTICE and higher goes to the syslog and so on etc. etc.

Functions

goa_log ()

void
goa_log (GoaLogLevel level,
         const gchar *function,
         const gchar *location,
         const gchar *format,
         ...);

Low-level logging function used by goa_debug() and other macros.

Parameters

level

A GoaLogLevel.

 

function

Pass G_STRFUNC here.

 

location

Pass G_STRLOC here.

 

format

printf()-style format.

 

...

Arguments for format.

 

goa_debug()

#define goa_debug(...)   goa_log(GOA_LOG_LEVEL_DEBUG, G_STRFUNC, G_STRLOC, __VA_ARGS__);

Logging macro for GOA_LOG_LEVEL_DEBUG.

Parameters

...

printf()-style format string and arguments

 

goa_info()

#define goa_info(...)    goa_log(GOA_LOG_LEVEL_INFO, G_STRFUNC, G_STRLOC, __VA_ARGS__);

Logging macro for GOA_LOG_LEVEL_INFO.

Parameters

...

printf()-style format string and arguments

 

goa_notice()

#define goa_notice(...)    goa_log(GOA_LOG_LEVEL_NOTICE, G_STRFUNC, G_STRLOC, __VA_ARGS__);

Logging macro for GOA_LOG_LEVEL_NOTICE.

Parameters

...

printf()-style format string and arguments

 

goa_warning()

#define goa_warning(...) goa_log(GOA_LOG_LEVEL_WARNING, G_STRFUNC, G_STRLOC, __VA_ARGS__);

Logging macro for GOA_LOG_LEVEL_WARNING.

Parameters

...

printf()-style format string and arguments

 

goa_error()

#define goa_error(...)   goa_log(GOA_LOG_LEVEL_ERROR, G_STRFUNC, G_STRLOC, __VA_ARGS__);

Logging macro for GOA_LOG_LEVEL_ERROR.

Parameters

...

printf()-style format string and arguments

 

Types and Values

enum GoaLogLevel

Logging levels.

Members

GOA_LOG_LEVEL_DEBUG

Debug messages.

 

GOA_LOG_LEVEL_INFO

Informational messages.

 

GOA_LOG_LEVEL_NOTICE

Messages that the administrator should take notice of.

 

GOA_LOG_LEVEL_WARNING

Warning messages.

 

GOA_LOG_LEVEL_ERROR

Error messages.