pnmixer
Volume mixer for the system tray
Macros | Functions | Variables
support-log.c File Reference

Logging support. More...

#include <stdio.h>
#include <glib.h>
#include "support-log.h"
Include dependency graph for support-log.c:

Go to the source code of this file.

Macros

#define VT_ESC   "\033"
 
#define VT_RESET   "[0m"
 
#define VT_RED   "[0;31m"
 
#define VT_GREY   "[0;37m"
 
#define VT_YELLOW   "[1;33m"
 

Functions

void log_msg_v (enum log_level level, const char *file, const char *format, va_list args)
 
void log_msg (enum log_level level, const char *file, const char *format,...)
 

Variables

gboolean want_debug = FALSE
 

Detailed Description

Logging support.

Logging support.

Definition in file support-log.c.

Macro Definition Documentation

◆ VT_ESC

#define VT_ESC   "\033"

Definition at line 26 of file support-log.c.

◆ VT_GREY

#define VT_GREY   "[0;37m"

Definition at line 29 of file support-log.c.

◆ VT_RED

#define VT_RED   "[0;31m"

Definition at line 28 of file support-log.c.

◆ VT_RESET

#define VT_RESET   "[0m"

Definition at line 27 of file support-log.c.

◆ VT_YELLOW

#define VT_YELLOW   "[1;33m"

Definition at line 30 of file support-log.c.

Function Documentation

◆ log_msg()

void log_msg ( enum log_level  level,
const char *  file,
const char *  format,
  ... 
)

Log a message.

Parameters
levelthe log level.
filethe file name.
formatthe message format. See the printf() documentation.
...the parameters to insert into the format string.

Definition at line 84 of file support-log.c.

◆ log_msg_v()

void log_msg_v ( enum log_level  level,
const char *  file,
const char *  format,
va_list  args 
)

Log a message.

Parameters
levelthe log level.
filethe file name.
formatthe message format. See the printf() documentation.
argsthe parameters to insert into the format string.

Definition at line 49 of file support-log.c.

Variable Documentation

◆ want_debug

gboolean want_debug = FALSE

Global variable to control whether we want debugging. This variable is initialized in main() and depends on the '–debug'/'-d' command line argument.

Definition at line 38 of file support-log.c.