Implement logging to a SHM ringbuffer
This feature is automatically enabled when running a debug version of i3. The logfile will use 1% of your physical RAM size, but at max 25 MiB.
This commit is contained in:
@ -21,6 +21,8 @@
|
||||
|
||||
extern char *loglevels[];
|
||||
extern char *errorfilename;
|
||||
extern char *shmlogname;
|
||||
extern int shmlog_size;
|
||||
|
||||
/**
|
||||
* Initializes logging by creating an error logfile in /tmp (or
|
||||
@ -35,6 +37,13 @@ void init_logging();
|
||||
*/
|
||||
void add_loglevel(const char *level);
|
||||
|
||||
/**
|
||||
* Returns the offsets for the next write and for the last wrap.
|
||||
* Necessary to print the i3 SHM log in the correct order.
|
||||
*
|
||||
*/
|
||||
void get_log_markers(int *offset_next_write, int *offset_last_wrap, int *size);
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
Reference in New Issue
Block a user