]> git.sur5r.net Git - i3/i3/blobdiff - include/log.h
Implement logging to a SHM ringbuffer
[i3/i3] / include / log.h
index ef6deb20fe5a993e1e0224f37e70ad18caf5f861..ef24bda8dc37d628c11547f585185fc923e1cde4 100644 (file)
@@ -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