]> git.sur5r.net Git - i3/i3/blobdiff - include/log.h
Use #pragma once
[i3/i3] / include / log.h
index 7822fba50f66b9ba51943e2eef62776bfc3e799d..2400092ba2b64244092e0aba2e5a0eca1f4e3da0 100644 (file)
@@ -7,8 +7,7 @@
  * log.c: Logging functions.
  *
  */
-#ifndef _LOG_H
-#define _LOG_H
+#pragma once
 
 #include <stdarg.h>
 #include <stdbool.h>
@@ -21,6 +20,9 @@
 #if defined(ELOG)
 #undef ELOG
 #endif
+#if defined(DLOG)
+#undef DLOG
+#endif
 /** ##__VA_ARGS__ means: leave out __VA_ARGS__ completely if it is empty, that
    is, delete the preceding comma */
 #define LOG(fmt, ...) verboselog(fmt, ##__VA_ARGS__)
@@ -38,6 +40,24 @@ extern int shmlog_size;
  */
 void init_logging(void);
 
+/**
+ * Opens the logbuffer.
+ *
+ */
+void open_logbuffer(void);
+
+/**
+ * Closes the logbuffer.
+ *
+ */
+void close_logbuffer(void);
+
+/**
+ * Checks if debug logging is active.
+ *
+ */
+bool get_debug_logging(void);
+
 /**
  * Set debug logging.
  *
@@ -81,5 +101,3 @@ void verboselog(char *fmt, ...)
  * failures. This function is invoked automatically when exiting.
  */
 void purge_zerobyte_logfile(void);
-
-#endif