libalpm_log(3) Library Functions Manual libalpm_log(3)

libalpm_log - Logging Functions


- Functions to log using libalpm


typedef void(* alpm_cb_log) (void *ctx, alpm_loglevel_t level, const char *fmt, va_list args)
The callback type for logging.


enum alpm_loglevel_t { ALPM_LOG_ERROR = 1, ALPM_LOG_WARNING = (1 << 1), ALPM_LOG_DEBUG = (1 << 2), ALPM_LOG_FUNCTION = (1 << 3) }
Logging Levels.


int alpm_logaction (alpm_handle_t *handle, const char *prefix, const char *fmt,...) __attribute__((format(printf
A printf-like function for logging.

Functions to log using libalpm

The callback type for logging. libalpm will call this function whenever something is to be logged. many libalpm will produce log output. Additionally any calls to alpm_logaction will also call this callback.

Parameters

ctx user-provided context
level the currently set loglevel
fmt the printf like format string
args printf like arguments

Logging Levels.

Enumerator

Error.
Warning.
Debug.
Function.

A printf-like function for logging.

Parameters

handle the context handle
prefix caller-specific prefix for the log
fmt output format

Returns

0 on success, -1 on error (pm_errno is set accordingly)

Generated automatically by Doxygen for libalpm from the source code.

libalpm