-void silc_log_output_debug(char *file, char *function,
- int line, char *string);
-void silc_log_output(const char *filename, uint32 maxsize,
- SilcLogType type, char *string);
-void silc_log_output_hexdump(char *file, char *function,
- int line, void *data_in,
- uint32 len, char *string);
-void silc_log_set_files(char *info, uint32 info_size,
- char *warning, uint32 warning_size,
- char *error, uint32 error_size,
- char *fatal, uint32 fatal_size);
-void silc_log_set_callbacks(SilcLogCb info, SilcLogCb warning,
- SilcLogCb error, SilcLogCb fatal);
-void silc_log_reset_callbacks();
-void silc_log_set_debug_callbacks(SilcDebugCb debug,
- SilcDebugHexdumpCb debug_hexdump);
-void silc_log_reset_debug_callbacks();
-
-#endif
+
+/****f* silcutil/SilcLogAPI/silc_log_set_file
+ *
+ * SYNOPSIS
+ *
+ * SilcBool silc_log_set_file(SilcLogType type, char *filename,
+ * SilcUInt32 maxsize,
+ * SilcSchedule scheduler);
+ *
+ * DESCRIPTION
+ *
+ * Sets `filename', which can be maximum `maxsize' bytes long, as the new
+ * logging file for the channel `type'. If you specify an illegal filename
+ * a warning message is printed and FALSE is returned. In this case
+ * logging settings are not changed.
+ *
+ * You can disable logging for a channel by specifying NULL filename, the
+ * maxsize in this case is not important. The `scheduler' parameter is
+ * needed by the internal logging to allow buffered output and thus to
+ * save HD activity. If `scheduler' is NULL this will call
+ * silc_schedule_get_global to try to get global scheduler.
+ *
+ ***/
+SilcBool silc_log_set_file(SilcLogType type, char *filename,
+ SilcUInt32 maxsize, SilcSchedule scheduler);
+
+/****f* silcutil/SilcLogAPI/silc_log_get_file
+ *
+ * SYNOPSIS
+ *
+ * char *silc_log_get_file(SilcLogType type);
+ *
+ * DESCRIPTION
+ *
+ * Returns the current logging file for the channel `type'.
+ * If there has been an error during the opening of this channel, NULL
+ * is returned, even if the file has been previously set with
+ * silc_log_set_file().
+ *
+ * The returned pointer points to internally allocated storage and must
+ * not be freed, modified or stored.
+ *
+ ***/
+char *silc_log_get_file(SilcLogType type);
+
+/****f* silcutil/SilcLogAPI/silc_log_set_callback
+ *
+ * SYNOPSIS
+ *
+ * void silc_log_set_callback(SilcLogType type, SilcLogCb cb,
+ * void *context);
+ *
+ * DESCRIPTION
+ *
+ * Set `cb' as the default callback function for the logging channel
+ * `type'. When SilcLog receives a message for this channel, it will
+ * trigger the callback function. If the callback function returns TRUE
+ * SilcLog will assume the input as handled and won't run its default
+ * handler.
+ *
+ * You can disable/remove a callback by setting it to NULL or calling the
+ * function silc_log_reset_callbacks. If set, the callback function
+ * must be in the form described by SilcLogCb.
+ *
+ * SEE ALSO
+ * silc_log_reset_callbacks
+ *
+ ***/
+void silc_log_set_callback(SilcLogType type, SilcLogCb cb, void *context);
+
+/****f* silcutil/SilcLogAPI/silc_log_reset_callbacks
+ *
+ * SYNOPSIS
+ *
+ * void silc_log_reset_callbacks();
+ *
+ * DESCRIPTION
+ *
+ * Removes all logging callbacks for normal channels. This function does
+ * NOT remove callbacks for debugging channels (debug and hexdump), you
+ * rather need to call silc_log_set_debug_callbacks() with NULL callbacks.
+ *
+ ***/
+void silc_log_reset_callbacks(void);
+
+/****f* silcutil/SilcLogAPI/silc_log_flush_all
+ *
+ * SYNOPSIS
+ *
+ * void silc_log_flush_all();
+ *
+ * DESCRIPTION
+ *
+ * Forces flushing for all logging channels. This should be called for
+ * example after receiving special signals.
+ *
+ * SEE ALSO
+ * silc_log_quick
+ *
+ ***/
+void silc_log_flush_all(void);
+
+/****f* silcutil/SilcLogAPI/silc_log_reset_all
+ *
+ * SYNOPSIS
+ *
+ * void silc_log_reset_all();
+ *
+ * DESCRIPTION
+ *
+ * Forces all logging channels to close and reopen their streams. Useful
+ * for example after a SIGHUP signal.
+ *
+ * Please note that this function could generate some warning messages if
+ * one or more logging channels point to an illegal filename.
+ *
+ ***/
+void silc_log_reset_all(void);
+
+/****f* silcutil/SilcLogAPI/silc_log_set_debug_callbacks
+ *
+ * SYNOPSIS
+ *
+ * void silc_log_set_debug_callbacks(SilcLogDebugCb debug_cb,
+ * void *debug_context,
+ * SilcLogHexdumpCb hexdump_cb,
+ * void *hexdump_context);
+ *
+ * DESCRIPTION
+ *
+ * Sets `debug_cb' as the the default callback function for the debug
+ * output, that will be called with the `debug_context' parameter.
+ * When SilcLog receives a debug message, it will trigger the callback
+ * function. If the callback function returns TRUE SilcLog will assume
+ * the input as handled and won't run its default handler. The `hexdump_cb'
+ * and `hexdump_context' works the same way, except that they are referred
+ * to SILC_LOG_HEXDUMP requests.
+ *
+ * You can disable/remove a callback by setting it to NULL. If set, each
+ * callback function must be either in the form described by SilcLogDebugCb
+ * or SilcLogHexdumpCb.
+ *
+ ***/
+void silc_log_set_debug_callbacks(SilcLogDebugCb debug_cb,
+ void *debug_context,
+ SilcLogHexdumpCb hexdump_cb,
+ void *hexdump_context);
+
+/****f* silcutil/SilcLogAPI/silc_log_reset_debug_callbacks
+ *
+ * SYNOPSIS
+ *
+ * void silc_log_reset_debug_callbacks();
+ *
+ * DESCRIPTION
+ *
+ * Resets debug callbacks set with silc_log_set_debug_callbacks.
+ *
+ ***/
+void silc_log_reset_debug_callbacks(void);
+
+/****f* silcutil/SilcLogAPI/silc_log_set_debug_string
+ *
+ * SYNOPSIS
+ *
+ * void silc_log_set_debug_string(const char *debug_string);
+ *
+ * DESCRIPTION
+ *
+ * Sets `debug_string' as the regexp string for filtering debugging
+ * output. The string is copied and it can be modified/destroyed after
+ * this function call.
+ *
+ ***/
+void silc_log_set_debug_string(const char *debug_string);
+
+/****f* silcutil/SilcLogAPI/silc_log_timestamp
+ *
+ * NAME
+ *
+ * void silc_log_timestamp(SilcBool enable);
+ *
+ * DESCRIPTION
+ *
+ * Use timestamp in log messages. Set `enable' to TRUE to enable
+ * timestamp and to FALSE to disable it. Default is TRUE.
+ *
+ ***/
+void silc_log_timestamp(SilcBool enable);
+
+/****f* silcutil/SilcLogAPI/silc_log_flushdelay
+ *
+ * NAME
+ *
+ * void silc_log_flushdelay(SilcUInt32 flushdelay);
+ *
+ * DESCRIPTION
+ *
+ * Sets the logfiles flushing delay in seconds. Default is 300 seconds.
+ *
+ ***/
+void silc_log_flushdelay(SilcUInt32 flushdelay);
+
+/****f* silcutil/SilcLogAPI/silc_log_quick
+ *
+ * NAME
+ *
+ * void silc_log_quick(SilcBool enable);
+ *
+ * DESCRIPTION
+ *
+ * SilcLog makes use of libc stream buffering output, which means that it
+ * saves HD activity by buffering the logging messages and writing them
+ * all together every some minutes (default is 5 minutes).
+ *
+ * Setting `enable' to TRUE will force SilcLog to write messages to the
+ * filesystem as soon as they are received. This increases the CPU activity
+ * notably on bigger servers, but reduces memory usage.
+ *
+ * If you want to change the logging style on-the-fly, make sure to call
+ * silc_log_flush_all() after setting `enable' to TRUE.
+ *
+ * Default is FALSE.
+ *
+ ***/
+void silc_log_quick(SilcBool enable);
+
+/****v* silcutil/SilcLogAPI/silc_log_debug
+ *
+ * NAME
+ *
+ * void silc_log_debug(SilcBool enable);
+ *
+ * DESCRIPTION
+ *
+ * If `enable' is set to FALSE, debugging functions won't procude any
+ * output and if set to TRUE prints debug messages to stderr. Default
+ * is FALSE.
+ *
+ * SEE ALSO
+ * SILC_LOG_DEBUG
+ *
+ ***/
+void silc_log_debug(SilcBool enable);
+
+/****v* silcutil/SilcLogAPI/silc_log_debug_hexdump
+ *
+ * NAME
+ *
+ * void silc_log_debug_hexdump(SilcBool enable);
+ *
+ * DESCRIPTION
+ *
+ * If `enable' is set to FALSE, debugging functions won't produce
+ * any output anf if set to TRUE prints hexdump debug message to
+ * stderr. Default is FALSE.
+ *
+ * SEE ALSO
+ * SILC_LOG_HEXDUMP
+ *
+ ***/
+void silc_log_debug_hexdump(SilcBool enable);
+
+#endif /* !SILCLOG_H */