diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2005-02-12 21:21:54 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2005-02-12 21:21:54 +0000 |
commit | 0473d2c8db2875bfd7049a94f662984a8e8f815b (patch) | |
tree | 17535cee7496da80bd6022bcaae3eaf94aeba707 /src/common/log.c | |
parent | 34ce958df991fcbfed772c591bcf2dc3c8e86b7a (diff) | |
download | weechat-0473d2c8db2875bfd7049a94f662984a8e8f815b.zip |
Plugins messages are logged with new config option (log_plugin_msg); on server buffer, only server messages are logged
Diffstat (limited to 'src/common/log.c')
-rw-r--r-- | src/common/log.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/common/log.c b/src/common/log.c index cdaaba286..06f62f7cd 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -31,6 +31,7 @@ #include "weechat.h" #include "log.h" #include "weeconfig.h" +#include "../gui/gui.h" /* @@ -72,6 +73,28 @@ log_write (t_gui_buffer *buffer, char *message) } /* + * log_write_line: writes a WeeChat line to log file + */ + +void +log_write_line (t_gui_buffer *buffer, t_gui_line *line) +{ + t_gui_message *ptr_msg; + + if (buffer->log_file) + { + log_write_date (buffer); + for (ptr_msg = line->messages; ptr_msg; ptr_msg = ptr_msg->next_message) + { + if (ptr_msg->type != MSG_TYPE_TIME) + fprintf (buffer->log_file, "%s", ptr_msg->message); + } + fprintf (buffer->log_file, "\n"); + fflush (buffer->log_file); + } +} + +/* * log_start: starts a log */ |