summaryrefslogtreecommitdiff
path: root/src/core/log.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-10-28 03:01:11 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-10-28 03:01:11 +0000
commit8653c6ea36c29067a358ed59782b71ffd1401fc3 (patch)
treef17c582280ae923387e50528405c9ad3e189e67d /src/core/log.c
parent80dd793c60bd58190c42e8fe76ae6e8825975373 (diff)
downloadirssi-8653c6ea36c29067a358ed59782b71ffd1401fc3.zip
/SET log_theme - you can now write to log files with different theme
than to screen. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@795 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/log.c')
-rw-r--r--src/core/log.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/src/core/log.c b/src/core/log.c
index 67dfb2af..d68265fe 100644
--- a/src/core/log.c
+++ b/src/core/log.c
@@ -234,8 +234,8 @@ LOG_ITEM_REC *log_item_find(LOG_REC *log, int type, const char *item,
return NULL;
}
-static void log_file_write(SERVER_REC *server, const char *item, int level,
- const char *str, int no_fallbacks)
+void log_file_write(SERVER_REC *server, const char *item, int level,
+ const char *str, int no_fallbacks)
{
GSList *tmp, *fallbacks;
char *tmpstr;
@@ -418,30 +418,6 @@ void log_close(LOG_REC *log)
log_destroy(log);
}
-static void sig_printtext_stripped(void *window, SERVER_REC *server,
- const char *item, gpointer levelp,
- const char *str)
-{
- char **items, **tmp;
- int level;
-
- g_return_if_fail(str != NULL);
-
- level = GPOINTER_TO_INT(levelp);
- if (logs == NULL || level == MSGLEVEL_NEVER)
- return;
-
- if (item == NULL)
- log_file_write(server, NULL, level, str, FALSE);
- else {
- /* there can be multiple items separated with comma */
- items = g_strsplit(item, ",", -1);
- for (tmp = items; *tmp != NULL; tmp++)
- log_file_write(server, *tmp, level, str, FALSE);
- g_strfreev(items);
- }
-}
-
static int sig_rotate_check(void)
{
static int last_hour = -1;
@@ -559,7 +535,6 @@ void log_init(void)
log_read_config();
signal_add("setup changed", (SIGNAL_FUNC) read_settings);
signal_add("setup reread", (SIGNAL_FUNC) log_read_config);
- signal_add("print text stripped", (SIGNAL_FUNC) sig_printtext_stripped);
}
void log_deinit(void)
@@ -571,5 +546,4 @@ void log_deinit(void)
signal_remove("setup changed", (SIGNAL_FUNC) read_settings);
signal_remove("setup reread", (SIGNAL_FUNC) log_read_config);
- signal_remove("print text stripped", (SIGNAL_FUNC) sig_printtext_stripped);
}