src/log.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include "util.h"
#include "log.h"
#include "loglevels.h"
Go to the source code of this file.
Functions |
void | set_verbosity (bool _verbose) |
| Set verbosity of i3.
|
void | add_loglevel (const char *level) |
| Enables the given loglevel.
|
void | vlog (char *fmt, va_list args) |
void | verboselog (char *fmt,...) |
| Logs the given message to stdout while prefixing the current time to it, but only if verbose mode is activated.
|
void | errorlog (char *fmt,...) |
| Logs the given message to stdout while prefixing the current time to it.
|
void | debuglog (int lev, char *fmt,...) |
| Logs the given message to stdout while prefixing the current time to it, but only if the corresponding debug loglevel was activated.
|
Variables |
static uint32_t | loglevel = 0 |
static bool | verbose = false |
Function Documentation
void add_loglevel |
( |
const char * |
level |
) |
|
void debuglog |
( |
int |
lev, |
|
|
char * |
fmt, |
|
|
|
... | |
|
) |
| | |
Logs the given message to stdout while prefixing the current time to it, but only if the corresponding debug loglevel was activated.
Definition at line 112 of file log.c.
References loglevel, and vlog().
void errorlog |
( |
char * |
fmt, |
|
|
|
... | |
|
) |
| | |
Logs the given message to stdout while prefixing the current time to it.
Definition at line 98 of file log.c.
References vlog().
void set_verbosity |
( |
bool |
_verbose |
) |
|
Set verbosity of i3.
If verbose is set to true, informative messages will be printed to stdout. If verbose is set to false, only errors will be printed.
Definition at line 33 of file log.c.
References verbose.
Referenced by main().
void verboselog |
( |
char * |
fmt, |
|
|
|
... | |
|
) |
| | |
Logs the given message to stdout while prefixing the current time to it, but only if verbose mode is activated.
Definition at line 83 of file log.c.
References verbose, and vlog().
void vlog |
( |
char * |
fmt, |
|
|
va_list |
args | |
|
) |
| | |
Variable Documentation