*/
/* $Id$ */
-#include "silcincludes.h"
+#include "silc.h"
/* SilcLogSettings context */
typedef struct {
if (silclog.flushdelay < 2)
silclog.flushdelay = 2;
- silc_schedule_task_add(context, 0, silc_log_fflush_callback, context,
- silclog.flushdelay, 0, SILC_TASK_TIMEOUT,
- SILC_TASK_PRI_NORMAL);
+ silc_schedule_task_add_timeout(context, silc_log_fflush_callback, context,
+ silclog.flushdelay, 0);
}
/* Output log message to log file */
/* Set and initialize the specified log file. */
-bool silc_log_set_file(SilcLogType type, char *filename, SilcUInt32 maxsize,
- SilcSchedule scheduler)
+SilcBool silc_log_set_file(SilcLogType type, char *filename,
+ SilcUInt32 maxsize, SilcSchedule scheduler)
{
FILE *fp = NULL;
SilcLog log;
/* Add flush timeout */
if (scheduler) {
silc_schedule_task_del_by_callback(scheduler, silc_log_fflush_callback);
- silc_schedule_task_add(scheduler, 0, silc_log_fflush_callback, scheduler,
- 10, 0, SILC_TASK_TIMEOUT, SILC_TASK_PRI_NORMAL);
+ silc_schedule_task_add_timeout(scheduler, silc_log_fflush_callback,
+ scheduler, 10, 0);
silclog.scheduled = TRUE;
}
/* Set timestamp */
-void silc_log_timestamp(bool enable)
+void silc_log_timestamp(SilcBool enable)
{
silclog.timestamp = enable;
}
/* Set quick logging */
-void silc_log_quick(bool enable)
+void silc_log_quick(SilcBool enable)
{
silclog.quick = enable;
}
/* Set debugging */
-void silc_log_debug(bool enable)
+void silc_log_debug(SilcBool enable)
{
silclog.debug = enable;
}
/* Set debug hexdump */
-void silc_log_debug_hexdump(bool enable)
+void silc_log_debug_hexdump(SilcBool enable)
{
silclog.debug_hexdump = enable;
}