aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-log.h
diff options
context:
space:
mode:
authorBertrand Guiheneuf <bertrand@src.gnome.org>1999-08-01 21:38:28 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-08-01 21:38:28 +0800
commitcac0ba57e6c47acd94600b5add1930301df33c50 (patch)
treea399fb592b6e5df4afbaa7d1d677d818b3767880 /camel/camel-log.h
parent5709aa9ef61dc720571acec93085f7d2d4ef4758 (diff)
downloadgsoc2013-evolution-cac0ba57e6c47acd94600b5add1930301df33c50.tar
gsoc2013-evolution-cac0ba57e6c47acd94600b5add1930301df33c50.tar.gz
gsoc2013-evolution-cac0ba57e6c47acd94600b5add1930301df33c50.tar.bz2
gsoc2013-evolution-cac0ba57e6c47acd94600b5add1930301df33c50.tar.lz
gsoc2013-evolution-cac0ba57e6c47acd94600b5add1930301df33c50.tar.xz
gsoc2013-evolution-cac0ba57e6c47acd94600b5add1930301df33c50.tar.zst
gsoc2013-evolution-cac0ba57e6c47acd94600b5add1930301df33c50.zip
merge a lot of work. Rough ChangeLog will follow
svn path=/trunk/; revision=1052
Diffstat (limited to 'camel/camel-log.h')
-rw-r--r--camel/camel-log.h46
1 files changed, 33 insertions, 13 deletions
diff --git a/camel/camel-log.h b/camel/camel-log.h
index 5ab9f8f405..82fb430719 100644
--- a/camel/camel-log.h
+++ b/camel/camel-log.h
@@ -31,25 +31,45 @@
extern int camel_debug_level;
extern FILE *camel_log_file_descriptor;
-typedef enum {
- NO_LOG = 0,
- STRANGE = 5,
- WARNING = 6,
- TRACE = 8,
- FULL_DEBUG = 10
-} CamelLogLevel;
+#define CAMEL_LOG_LEVEL_NO_LOG 0
+#define CAMEL_LOG_LEVEL_STRANGE 5
+#define CAMEL_LOG_LEVEL_WARNING 6
+#define CAMEL_LOG_LEVEL_TRACE 8
+#define CAMEL_LOG_LEVEL_FULL_DEBUG 10
-#define HARD_LOG_LEVEL TRACE
+/* #define CAMEL_HARD_LOG_LEVEL CAMEL_LOG_LEVEL_TRACE */
/* the idea here is to be able to have a hard maximum log
level, given at compilation time, and a soft one, given at
-runtime (with camel_debug_level). For the moment, only
-soft level is implmented, but one day, when performance
-become important, I will set the hard one too */
+runtime (with camel_debug_level) */
+#if CAMEL_HARD_LOG_LEVEL>=CAMEL_LOG_LEVEL_STRANGE
+#define CAMEL_LOG_STRANGE(args...) camel_log(CAMEL_LOG_LEVEL_STRANGE, ##args)
+#else /* CAMEL_LOG_LEVEL_STRANGE */
+#define CAMEL_LOG_STRANGE(args...)
+#endif /* CAMEL_LOG_LEVEL_STRANGE */
-#define CAMEL_LOG(level, args...) camel_log(level,##args)
+#if CAMEL_HARD_LOG_LEVEL>=CAMEL_LOG_LEVEL_WARNING
+#define CAMEL_LOG_WARNING(args...) camel_log(CAMEL_LOG_LEVEL_WARNING, ##args)
+#else /* CAMEL_LOG_LEVEL_WARNING */
+#define CAMEL_LOG_WARNING(args...)
+#endif /* CAMEL_LOG_LEVEL_WARNING */
-extern void camel_log(CamelLogLevel level, const gchar *format, ... );
+#if CAMEL_HARD_LOG_LEVEL>=CAMEL_LOG_LEVEL_TRACE
+#define CAMEL_LOG_TRACE(args...) camel_log(CAMEL_LOG_LEVEL_TRACE, ##args)
+#else /* CAMEL_LOG_LEVEL_TRACE */
+#define CAMEL_LOG_TRACE(args...)
+#endif /* CAMEL_LOG_LEVEL_TRACE */
+
+#if CAMEL_HARD_LOG_LEVEL>=CAMEL_LOG_LEVEL_FULL_DEBUG
+#define CAMEL_LOG_FULL_DEBUG(args...) camel_log(CAMEL_LOG_LEVEL_FULL_DEBUG, ##args)
+#else /* CAMEL_LOG_LEVEL_FULL_DEBUG */
+#define CAMEL_LOG_FULL_DEBUG(args...)
+#endif /* CAMEL_LOG_LEVEL_FULL_DEBUG */
+
+
+
+
+extern void camel_log(guint level, const gchar *format, ... );
#endif /* CAMEL_LOG_H */