diff options
Diffstat (limited to 'src/ckerrlog.h')
-rw-r--r-- | src/ckerrlog.h | 27 |
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 |