summaryrefslogtreecommitdiffstats
path: root/lib/logging.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:22:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:22:03 +0000
commitffccd5b2b05243e7976db80f90f453dccfae9886 (patch)
tree39a43152d27f7390d8f7a6fb276fa6887f87c6e8 /lib/logging.h
parentInitial commit. (diff)
downloadmc-ffccd5b2b05243e7976db80f90f453dccfae9886.tar.xz
mc-ffccd5b2b05243e7976db80f90f453dccfae9886.zip
Adding upstream version 3:4.8.30.upstream/3%4.8.30
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/logging.h')
-rw-r--r--lib/logging.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/logging.h b/lib/logging.h
new file mode 100644
index 0000000..effdfb4
--- /dev/null
+++ b/lib/logging.h
@@ -0,0 +1,32 @@
+/** \file logging.h
+ * \brief Header: provides a log file to ease tracing the program
+ */
+
+#ifndef MC_LOGGING_H
+#define MC_LOGGING_H
+
+/*
+ This file provides an easy-to-use function for writing all kinds of
+ events into a central log file that can be used for debugging.
+ */
+
+/*** typedefs(not structures) and defined constants **********************************************/
+
+#define mc_log_mark() mc_log("%s:%d\n",__FILE__,__LINE__)
+
+/*** enums ***************************************************************************************/
+
+/*** structures declarations (and typedefs of structures)*****************************************/
+
+/*** global variables defined in .c file *********************************************************/
+
+/*** declarations of public functions ************************************************************/
+
+/* *INDENT-OFF* */
+void mc_log (const char *fmt, ...) G_GNUC_PRINTF (1, 2);
+void mc_always_log (const char *fmt, ...) G_GNUC_PRINTF (1, 2);
+/* *INDENT-ON* */
+
+/*** inline functions ****************************************************************************/
+
+#endif