aboutsummaryrefslogtreecommitdiffstats
path: root/src/ckerrlog.h
diff options
context:
space:
mode:
authorAnastasis Grammenos <anastasis.gramm2@gmail.com>2018-10-16 10:41:01 +0300
committerAnastasis Grammenos <anastasis.gramm2@gmail.com>2018-10-16 10:41:01 +0300
commit5b8b4fdbfc6f88e874bc62269b9188caf886120f (patch)
treee752d2b3faa863daa9817c23783aa5734fbeec9b /src/ckerrlog.h
parentb11d039ba3888aa76d63006e0af2a6f05304b380 (diff)
downloadck-5b8b4fdbfc6f88e874bc62269b9188caf886120f.tar.gz
ck-5b8b4fdbfc6f88e874bc62269b9188caf886120f.tar.bz2
ck-5b8b4fdbfc6f88e874bc62269b9188caf886120f.zip
Update file headers
Diffstat (limited to 'src/ckerrlog.h')
-rw-r--r--src/ckerrlog.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/ckerrlog.h b/src/ckerrlog.h
index 2506e99..a559764 100644
--- a/src/ckerrlog.h
+++ b/src/ckerrlog.h
@@ -7,6 +7,33 @@
* Copyright (C) 2018 Anastasis Grammenos
* GPLv3 (see LICENCE for the full notice)
*
+ * -----------------------------------------------------------------------------
+ *
+ * The error reporting and logging infrastructure used across ck.
+ * This file defines the basic macros other functions should call to
+ * report problems or help the user.
+ *
+ * All macros use printf like syntax to format the resutling strings.
+ * There is no need for newline (`\n`) it is automatically appended to
+ * each string.
+ *
+ * ERRLOG(component-name)
+ * Should be called once in every .c file defining the component name
+ * to be used with error reporting and logging.
+ *
+ * LOG("format-string", ...)
+ * Add format-string to the log. The component name is prepended.
+ * The log can be saved to a logfile and/or printed at the end of
+ * the ck session provided the --verbose flag is active.
+ *
+ * ERR("format-string", ...)
+ * Reports the format-string at the moment of calling, prepended with
+ * Error and the component-name. Also adds the error to the log.
+ *
+ * HELP("format-string", ...)
+ * Print the format-string at the moment of calling, without adding
+ * any component name nor pushing the string to the log.
+ *
* -------------------------------------------------------------------------- */
#ifndef CKERRLOG_H
#define CKERRLOG_H