From 5b8b4fdbfc6f88e874bc62269b9188caf886120f Mon Sep 17 00:00:00 2001 From: Anastasis Grammenos Date: Tue, 16 Oct 2018 10:41:01 +0300 Subject: Update file headers --- src/ckerrlog.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/ckerrlog.h') 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 -- cgit v1.2.3