aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_common.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-10 13:06:29 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-10 13:06:29 +0000
commit55bd3dd2d67284afbe769179fdbe96ef10856b22 (patch)
treefa4151e71a85b03efa314342804af5afcd2acb8b /src/include/gnunet_common.h
parent48d42fc2f77879dc1541d8ad3c6cfcba644dbb1b (diff)
downloadgnunet-55bd3dd2d67284afbe769179fdbe96ef10856b22.tar.gz
gnunet-55bd3dd2d67284afbe769179fdbe96ef10856b22.zip
log from macros
Diffstat (limited to 'src/include/gnunet_common.h')
-rw-r--r--src/include/gnunet_common.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index ec54aece4..3b3288d14 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -384,8 +384,22 @@ GNUNET_error_type_to_string (enum GNUNET_ErrorType kind);
384 * a failure of the command 'cmd' with the message given 384 * a failure of the command 'cmd' with the message given
385 * by strerror(errno). 385 * by strerror(errno).
386 */ 386 */
387#define GNUNET_log_from_strerror(level, component, cmd) do { GNUNET_log_from (level, component, _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, STRERROR(errno)); } while(0)
388
389/**
390 * Log an error message at log-level 'level' that indicates
391 * a failure of the command 'cmd' with the message given
392 * by strerror(errno).
393 */
387#define GNUNET_log_strerror_file(level, cmd, filename) do { GNUNET_log(level, _("`%s' failed on file `%s' at %s:%d with error: %s\n"), cmd, filename,__FILE__, __LINE__, STRERROR(errno)); } while(0) 394#define GNUNET_log_strerror_file(level, cmd, filename) do { GNUNET_log(level, _("`%s' failed on file `%s' at %s:%d with error: %s\n"), cmd, filename,__FILE__, __LINE__, STRERROR(errno)); } while(0)
388 395
396/**
397 * Log an error message at log-level 'level' that indicates
398 * a failure of the command 'cmd' with the message given
399 * by strerror(errno).
400 */
401#define GNUNET_log_from_strerror_file(level, component, cmd, filename) do { GNUNET_log_from (level, component, _("`%s' failed on file `%s' at %s:%d with error: %s\n"), cmd, filename,__FILE__, __LINE__, STRERROR(errno)); } while(0)
402
389/* ************************* endianess conversion ****************** */ 403/* ************************* endianess conversion ****************** */
390 404
391/** 405/**