summaryrefslogtreecommitdiffstats
path: root/src/log.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-04-20 05:29:11 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-04-20 05:29:11 +0200
commit7adeb6e88196a594ec3d36ffc1c658340ffcd7bc (patch)
tree6a6bfb84387141bf39d573ef9fa47f2c993d1923 /src/log.h
parentb9c8603931203f5d94091f7a05a5967304b62fbd (diff)
downloadfastd-7adeb6e88196a594ec3d36ffc1c658340ffcd7bc.tar
fastd-7adeb6e88196a594ec3d36ffc1c658340ffcd7bc.zip
Make ctx global
Diffstat (limited to 'src/log.h')
-rw-r--r--src/log.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/log.h b/src/log.h
index 6e47590..0fe6b67 100644
--- a/src/log.h
+++ b/src/log.h
@@ -35,22 +35,22 @@
#define FASTD_DEFAULT_LOG_LEVEL LL_VERBOSE
-void fastd_logf(const fastd_context_t *ctx, fastd_loglevel_t level, const char *format, ...);
-
-#define pr_fatal(ctx, args...) fastd_logf(ctx, LL_FATAL, args)
-#define pr_error(ctx, args...) fastd_logf(ctx, LL_ERROR, args)
-#define pr_warn(ctx, args...) fastd_logf(ctx, LL_WARN, args)
-#define pr_info(ctx, args...) fastd_logf(ctx, LL_INFO, args)
-#define pr_verbose(ctx, args...) fastd_logf(ctx, LL_VERBOSE, args)
-#define pr_debug(ctx, args...) fastd_logf(ctx, LL_DEBUG, args)
-#define pr_debug2(ctx, args...) fastd_logf(ctx, LL_DEBUG2, args)
-
-#define pr_error_errno(ctx, message) pr_error(ctx, "%s: %s", message, strerror(errno))
-#define pr_warn_errno(ctx, message) pr_warn(ctx, "%s: %s", message, strerror(errno))
-#define pr_debug_errno(ctx, message) pr_debug(ctx, "%s: %s", message, strerror(errno))
-#define pr_debug2_errno(ctx, message) pr_debug2(ctx, "%s: %s", message, strerror(errno))
-
-#define exit_fatal(ctx, args...) do { pr_fatal(ctx, args); abort(); } while(0)
-#define exit_bug(ctx, message) exit_fatal(ctx, "BUG: %s", message)
-#define exit_error(ctx, args...) do { pr_error(ctx, args); exit(1); } while(0)
-#define exit_errno(ctx, message) exit_error(ctx, "%s: %s", message, strerror(errno))
+void fastd_logf(const fastd_loglevel_t level, const char *format, ...);
+
+#define pr_fatal(args...) fastd_logf(LL_FATAL, args)
+#define pr_error(args...) fastd_logf(LL_ERROR, args)
+#define pr_warn(args...) fastd_logf(LL_WARN, args)
+#define pr_info(args...) fastd_logf(LL_INFO, args)
+#define pr_verbose(args...) fastd_logf(LL_VERBOSE, args)
+#define pr_debug(args...) fastd_logf(LL_DEBUG, args)
+#define pr_debug2(args...) fastd_logf(LL_DEBUG2, args)
+
+#define pr_error_errno(message) pr_error("%s: %s", message, strerror(errno))
+#define pr_warn_errno(message) pr_warn("%s: %s", message, strerror(errno))
+#define pr_debug_errno(message) pr_debug("%s: %s", message, strerror(errno))
+#define pr_debug2_errno(message) pr_debug2("%s: %s", message, strerror(errno))
+
+#define exit_fatal(args...) do { pr_fatal(args); abort(); } while(0)
+#define exit_bug(message) exit_fatal("BUG: %s", message)
+#define exit_error(args...) do { pr_error(args); exit(1); } while(0)
+#define exit_errno(message) exit_error("%s: %s", message, strerror(errno))