Logging

Logging — Logging Routines

Synopsis

enum                UDisksLogLevel;
void                udisks_log                          (UDisksLogLevel level,
                                                         const gchar *function,
                                                         const gchar *location,
                                                         const gchar *format,
                                                         ...);
#define             udisks_debug                        (...)
#define             udisks_info                         (...)
#define             udisks_notice                       (...)
#define             udisks_warning                      (...)
#define             udisks_error                        (...)

Description

Logging routines.

Details

enum UDisksLogLevel

typedef enum {
  UDISKS_LOG_LEVEL_DEBUG,
  UDISKS_LOG_LEVEL_INFO,
  UDISKS_LOG_LEVEL_NOTICE,
  UDISKS_LOG_LEVEL_WARNING,
  UDISKS_LOG_LEVEL_ERROR
} UDisksLogLevel;

Logging levels. The level UDISKS_LOG_LEVEL_NOTICE and above goes to syslog.

Unlike g_warning() and g_error(), none of these logging levels causes the program to ever terminate.

UDISKS_LOG_LEVEL_DEBUG

Debug messages.

UDISKS_LOG_LEVEL_INFO

Informational messages.

UDISKS_LOG_LEVEL_NOTICE

Messages that the administrator should take notice of.

UDISKS_LOG_LEVEL_WARNING

Warning messages.

UDISKS_LOG_LEVEL_ERROR

Error messages.

udisks_log ()

void                udisks_log                          (UDisksLogLevel level,
                                                         const gchar *function,
                                                         const gchar *location,
                                                         const gchar *format,
                                                         ...);

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

level :

A UDisksLogLevel.

function :

Pass G_STRFUNC here.

location :

Pass G_STRLOC here.

format :

printf()-style format.

... :

Arguments for format.

udisks_debug()

#define udisks_debug(args...)   udisks_log(UDISKS_LOG_LEVEL_DEBUG, G_STRFUNC, G_STRLOC, args)

Logging macro for UDISKS_LOG_LEVEL_DEBUG.

See UDisksLogLevel for more details.


udisks_info()

#define udisks_info(args...)    udisks_log(UDISKS_LOG_LEVEL_INFO, G_STRFUNC, G_STRLOC, args)

Logging macro for UDISKS_LOG_LEVEL_INFO.

See UDisksLogLevel for more details.


udisks_notice()

#define udisks_notice(args...)    udisks_log(UDISKS_LOG_LEVEL_NOTICE, G_STRFUNC, G_STRLOC, args)

Logging macro for UDISKS_LOG_LEVEL_NOTICE.

See UDisksLogLevel for more details.


udisks_warning()

#define udisks_warning(args...) udisks_log(UDISKS_LOG_LEVEL_WARNING, G_STRFUNC, G_STRLOC, args)

Logging macro for UDISKS_LOG_LEVEL_WARNING.

See UDisksLogLevel for more details.


udisks_error()

#define udisks_error(args...)   udisks_log(UDISKS_LOG_LEVEL_ERROR, G_STRFUNC, G_STRLOC, args)

Logging macro for UDISKS_LOG_LEVEL_ERROR.

See UDisksLogLevel for more details.