You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2005/02/10 19:02:59 UTC

[Bug 4131] New: format of messages when logging to a file

http://bugzilla.spamassassin.org/show_bug.cgi?id=4131

           Summary: format of messages when logging to a file
           Product: Spamassassin
           Version: 3.0.2
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: spamc/spamd
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: lakka@20essexst.com


When logging to a file (e.g. with option "-s /var/log/filename") spamd produces lines like this:

2005-02-10 17:27:42 [19357] i: connection from localhost.localdomain [127.0.0.1] at port 40456
2005-02-10 17:27:42 [19357] i: checking message ...

What is the "i:" for?

It would be much more useful if the line inclluded the name of the generating process, eg spamd, for 
ease of identification when lines are logged to a logfile used also by other processes.

How about changing the sprintf line in sub logmsg_file from this:
  
 sprintf(
      "%04d-%02d-%02d %02d:%02d:%02d [%s] %s: %s\n",
      @date, $$, 'i', $msg
    )

to this:

 sprintf(
      "%04d-%02d-%02d %02d:%02d:%02d [%s] %s: %s\n",
      @date, $$, 'spamd', $msg
    )



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4131] format of messages when logging to a file

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4131


spamassassin-contrib@msquadrat.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




------- Additional Comments From spamassassin-contrib@msquadrat.de  2005-02-10 10:25 -------
You must not use this feature to "share" a log file between two or more  
processes because that will create great havoc as spamd doesn't use any  
locking and keeps the logfile always opened.  
  
The log-to-file feature is currently a bit fragile, if you want to do more  
(including rotation) than simple appending to a logfile, you should probably  
log to stderr and feed that to a log handler which is a bit more forgiving.  
This feature is mostly used for our test framework. 
 
I think the timestamp was already removed from the 3.1 codebase because it 
clashed with some other logging tools.  The "i: " stands for "information" btw 
-- currently spamd always uses the loglevel INFO, but there are plans to 
change that and such this part is some kind of upwards-compatibility. 
 
I close this as WONTFIX as adding the string "spamd" doesn't make much sense 
because of the first paragraph. 



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.