## Logging

Logging — Logging Routines

## Functions

void | udisks_log ()
#define | udisks_debug()
#define | udisks_info()
#define | udisks_notice()
#define | udisks_warning()
#define | udisks_error()

## Types and Values

enum | UDisksLogLevel

## Description

Logging routines.

## Functions

### 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.

#### Parameters

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...)

Logging macro for `UDISKS_LOG_LEVEL_DEBUG`. Warning: ONLY WORKS WHEN COMPILED WITH --enable-debug

See UDisksLogLevel for more details.

#### Parameters

args... | printf()-style format string and arguments |

### udisks_info()

    #define             udisks_info(args...)

Logging macro for `UDISKS_LOG_LEVEL_INFO`. Warning: ONLY WORKS WHEN COMPILED WITH --enable-debug

See UDisksLogLevel for more details.

#### Parameters

args... | printf()-style format string and arguments |

### udisks_notice()

    #define             udisks_notice(args...)

Logging macro for `UDISKS_LOG_LEVEL_MESSAGE`.

See UDisksLogLevel for more details.

#### Parameters

args... | printf()-style format string and arguments |

### udisks_warning()

    #define             udisks_warning(args...)

Logging macro for `UDISKS_LOG_LEVEL_WARNING`.

See UDisksLogLevel for more details.

#### Parameters

args... | printf()-style format string and arguments |

### udisks_error()

    #define             udisks_error(args...)

Logging macro for `UDISKS_LOG_LEVEL_ERROR`. Warning: THIS ALSO TERMINATES THE PROCESS with the `abort()` call!

See UDisksLogLevel for more details.

#### Parameters

args... | printf()-style format string and arguments |

## Types and Values

### enum 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.

#### Members

UDISKS_LOG_LEVEL_DEBUG | Debug messages. |
UDISKS_LOG_LEVEL_INFO | Informational messages. |
UDISKS_LOG_LEVEL_MESSAGE |  |
UDISKS_LOG_LEVEL_WARNING | Warning messages. |
UDISKS_LOG_LEVEL_CRITICAL |  |
UDISKS_LOG_LEVEL_ERROR | Error messages. |