/[weechat]/weechat/src/common/log.c
ViewVC logotype

Diff of /weechat/src/common/log.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by flashcode, Sat Jan 1 12:31:19 2005 UTC revision 1.3 by flashcode, Sat Feb 12 21:21:54 2005 UTC
# Line 31  Line 31 
31  #include "weechat.h"  #include "weechat.h"
32  #include "log.h"  #include "log.h"
33  #include "weeconfig.h"  #include "weeconfig.h"
34    #include "../gui/gui.h"
35    
36    
37  /*  /*
# Line 70  log_write (t_gui_buffer *buffer, char *m Line 71  log_write (t_gui_buffer *buffer, char *m
71          fflush (buffer->log_file);          fflush (buffer->log_file);
72      }      }
73  }  }
74    
75    /*
76     * log_write_line: writes a WeeChat line to log file
77     */
78    
79    void
80    log_write_line (t_gui_buffer *buffer, t_gui_line *line)
81    {
82        t_gui_message *ptr_msg;
83        
84        if (buffer->log_file)
85        {    
86            log_write_date (buffer);
87            for (ptr_msg = line->messages; ptr_msg; ptr_msg = ptr_msg->next_message)
88            {
89                if (ptr_msg->type != MSG_TYPE_TIME)
90                    fprintf (buffer->log_file, "%s", ptr_msg->message);
91            }
92            fprintf (buffer->log_file, "\n");
93            fflush (buffer->log_file);
94        }
95    }
96    
97  /*  /*
98   * log_start: starts a log   * log_start: starts a log

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26