aboutsummaryrefslogtreecommitdiff
path: root/src/util/common_logging.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-09-27 19:01:04 +0000
committerChristian Grothoff <christian@grothoff.org>2012-09-27 19:01:04 +0000
commit383eec1895fff4a83f26bb8244d86571dd5baef9 (patch)
treedc6eccf68932c71785ee86d688ebebeda2ac4025 /src/util/common_logging.c
parent195267a6ac380d106d9409aa296885251d102c8e (diff)
downloadgnunet-383eec1895fff4a83f26bb8244d86571dd5baef9.tar.gz
gnunet-383eec1895fff4a83f26bb8244d86571dd5baef9.zip
reducing error messages about missing configuration options by introducing new helper functions to print them uniformly
Diffstat (limited to 'src/util/common_logging.c')
-rw-r--r--src/util/common_logging.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index 6161d0c6d..23749dd99 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -1190,6 +1190,45 @@ GNUNET_a2s (const struct sockaddr *addr, socklen_t addrlen)
1190 1190
1191 1191
1192/** 1192/**
1193 * Log error message about missing configuration option.
1194 *
1195 * @param kind log level
1196 * @param section section with missing option
1197 * @param option name of missing option
1198 */
1199void
1200GNUNET_log_config_missing (enum GNUNET_ErrorType kind,
1201 const char *section,
1202 const char *option)
1203{
1204 GNUNET_log (kind,
1205 _("Configuration fails to specify option `%s' in section `%s'!\n"),
1206 option,
1207 section);
1208}
1209
1210
1211/**
1212 * Log error message about invalid configuration option value.
1213 *
1214 * @param kind log level
1215 * @param section section with invalid option
1216 * @param option name of invalid option
1217 * @param required what is required that is invalid about the option
1218 */
1219void
1220GNUNET_log_config_invalid (enum GNUNET_ErrorType kind,
1221 const char *section,
1222 const char *option,
1223 const char *required)
1224{
1225 GNUNET_log (kind,
1226 _("Configuration specifies invalid value for option `%s' in section `%s': %s\n"),
1227 option, section, required);
1228}
1229
1230
1231/**
1193 * Initializer 1232 * Initializer
1194 */ 1233 */
1195void __attribute__ ((constructor)) GNUNET_util_cl_init () 1234void __attribute__ ((constructor)) GNUNET_util_cl_init ()