silclog.h
- Author: Johnny Mnemonic <johnny@themnemonic.org>
+ Author: Giovanni Giacobbi <giovanni@giacobbi.net>
Copyright (C) 1997 - 2002 Pekka Riikonen
/* Global Variables */
+/****v* silcutil/SilcLogAPI/silc_log_timestamp
+ *
+ * NAME
+ *
+ * bool silc_log_timestamp -- enable/disable fast logging timestamp
+ *
+ * DESCRIPTION
+ *
+ * Causes SilcLog to add a timestamp as returned by silc_get_time().
+ * This may be useful for example if you run your application under a
+ * daemon helper like watchdog that adds its own timestamp. Defaults to
+ * true.
+ *
+ ***/
+extern DLLAPI bool silc_log_timestamp;
+
/****v* silcutil/SilcLogAPI/silc_log_quick
*
* NAME
/* Macros */
-#ifdef SILC_WIN32
+#if defined(WIN32)
+#ifndef __FUNCTION__
#define __FUNCTION__ ""
#endif
+#endif
+
+/****d* silcutil/SilcLogAPI/SILC_ENABLE_DEBUG
+ *
+ * NAME
+ *
+ * #define SILC_ENABLE_DEBUG
+ *
+ * DESCRIPTION
+ *
+ * Use this macro to enable the debugging in your application. If
+ * SILC was compiled with debugging enabled, this macro enables it.
+ * Use this macro in your application's main header, or in place where
+ * you need to enable the debugging.
+ *
+ * NOTES
+ *
+ * You still can control the debugging with silc_debug variable, on
+ * whether to actually print the debugging or not. This macro is
+ * used to enable debugging, not to say it is printed or not.
+ *
+ * SOURCE
+ */
+#define SILC_ENABLE_DEBUG \
+ #ifndef SILC_DEBUG \
+ #define SILC_DEBUG 1 \
+ #endif
+/***/
/****d* silcutil/SilcLogAPI/SILC_LOG_INFO
*
*
* SOURCE
*/
-#ifdef SILC_DEBUG
+#if defined(SILC_DEBUG)
#define SILC_LOG_DEBUG(fmt) silc_log_output_debug(__FILE__, \
__FUNCTION__, \
__LINE__, \
silc_format fmt)
+#define SILC_NOT_IMPLEMENTED(string) \
+ SILC_LOG_INFO(("*********** %s: NOT IMPLEMENTED YET", string));
#else
#define SILC_LOG_DEBUG(fmt)
+#define SILC_NOT_IMPLEMENTED(string)
#endif /* SILC_DEBUG */
/***/
*
* SOURCE
*/
-#ifdef SILC_DEBUG
+#if defined(SILC_DEBUG)
#define SILC_LOG_HEXDUMP(fmt, data, len) silc_log_output_hexdump(__FILE__, \
__FUNCTION__, \
__LINE__, \