5 LOG_ITEM_TARGET, /* channel, query, .. */
16 char *fname; /* file name, in strftime() format */
17 char *real_fname; /* the current expanded file name */
18 int handle; /* file handle */
21 int level; /* log only these levels */
22 GSList *items; /* log only on these items */
24 time_t last; /* when last message was written */
26 unsigned int autoopen:1; /* automatically start logging at startup */
27 unsigned int failed:1; /* opening log failed last time */
28 unsigned int temp:1; /* don't save this to config file */
33 /* Create log record - you still need to call log_update() to actually add it
35 LOG_REC *log_create_rec(const char *fname, int level);
36 void log_update(LOG_REC *log);
37 void log_close(LOG_REC *log);
38 LOG_REC *log_find(const char *fname);
40 void log_item_add(LOG_REC *log, int type, const char *name,
41 const char *servertag);
42 void log_item_destroy(LOG_REC *log, LOG_ITEM_REC *item);
43 LOG_ITEM_REC *log_item_find(LOG_REC *log, int type, const char *item,
44 const char *servertag);
46 void log_file_write(SERVER_REC *server, const char *item, int level,
47 const char *str, int no_fallbacks);
48 void log_write_rec(LOG_REC *log, const char *str, int level);
50 int log_start_logging(LOG_REC *log);
51 void log_stop_logging(LOG_REC *log);
54 void log_deinit(void);