From 892f21fd54556a50ef023502adf4fff2cb97656f Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 17 Aug 2016 12:34:22 +0200 Subject: [PATCH] base: document error-message style conventions --- repos/base/include/base/log.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/repos/base/include/base/log.h b/repos/base/include/base/log.h index 82ef4a7abb..c96e379206 100644 --- a/repos/base/include/base/log.h +++ b/repos/base/include/base/log.h @@ -110,6 +110,10 @@ namespace Genode { /** * Write 'args' as a warning message to the log + * + * The message is automatically prefixed with "Warning: ". Please refer to + * the description of the 'error' function regarding the convention of + * formatting error/warning messages. */ template void warning(ARGS &&... args) { Log::log().output(Log::WARNING, args...); } @@ -117,6 +121,11 @@ namespace Genode { /** * Write 'args' as an error message to the log + * + * The message is automatically prefixed with "Error: ". Hence, the + * message argument does not need to additionally state that it is an error + * message. By convention, the actual message should be brief, starting + * with a lower-case character. */ template void error(ARGS &&... args) { Log::log().output(Log::ERROR, args...); } @@ -125,7 +134,7 @@ namespace Genode { /** * Write 'args' directly via the kernel (i.e., kernel debugger) * - * This function is intended for temporarly debugging purposes only. + * This function is intended for temporarily debugging purposes only. */ template void raw(ARGS &&... args) { Raw::output(args...); }