|
i3
|
#include <stdarg.h>#include <stdio.h>#include <string.h>#include <stdbool.h>#include <stdlib.h>#include <sys/time.h>#include <unistd.h>#include <fcntl.h>#include "util.h"#include "log.h"#include "loglevels.h"
Go to the source code of this file.
Functions | |
| void | init_logging () |
| Initializes logging by creating an error logfile in /tmp (or XDG_RUNTIME_DIR, see get_process_filename()). | |
| 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 (uint64_t 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 uint64_t | loglevel = 0 |
| static bool | verbose = false |
| static FILE * | errorfile |
| char * | errorfilename |
| void add_loglevel | ( | const char * | level | ) |
| void debuglog | ( | uint64_t | lev, |
| char * | fmt, | ||
| ... | |||
| ) |
| void errorlog | ( | char * | fmt, |
| ... | |||
| ) |
| void init_logging | ( | ) |
Initializes logging by creating an error logfile in /tmp (or XDG_RUNTIME_DIR, see get_process_filename()).
Definition at line 35 of file log.c.
References ELOG, errorfile, errorfilename, and get_process_filename().
Referenced by main().

| void set_verbosity | ( | bool | _verbose | ) |
| void verboselog | ( | char * | fmt, |
| ... | |||
| ) |
| void vlog | ( | char * | fmt, |
| va_list | args | ||
| ) |
Definition at line 86 of file log.c.
Referenced by debuglog(), errorlog(), and verboselog().
FILE* errorfile [static] |
Definition at line 27 of file log.c.
Referenced by errorlog(), and init_logging().
| char* errorfilename |
Definition at line 28 of file log.c.
Referenced by init_logging(), and start_configerror_nagbar().
uint64_t loglevel = 0 [static] |
Definition at line 25 of file log.c.
Referenced by add_loglevel(), and debuglog().
bool verbose = false [static] |
Definition at line 26 of file log.c.
Referenced by set_verbosity(), and verboselog().
1.8.0