From franks-muc at web.de Tue Apr 10 22:21:06 2007 From: franks-muc at web.de (Frank Schorr) Date: Wed, 11 Apr 2007 00:21:06 +0200 Subject: [log5-devel] feedback and question Message-ID: <487236577@web.de> Gary, this is a feed back of my first use of log5. Previously I used log4CL with the daily rolling file appender pruducing a html file to be viewed with the browser. With browser update (F5) it is easy to read continously changing logfiles. This is what I am now doing with log5: (defun prepare-log-file (path) (with-open-file (s path :direction :output :if-exists :supersede) ;;stolen from Log4CL and modified (format s " Log5 Log Messages
Log session start at ~a

" (date-time-as-string (get-universal-time))))) (defparameter *logfile* "C:/lisp/log/mylog.html") (defoutput left "") (defoutput time (formatted-current-time)) (defoutput html-message (html-escape message)) (prepare-log-file *logfile*) (start-sender 'mysender (stream-sender :location *logfile*) :category-spec (application pdf) :output-spec (left time middle category middle html-message middle context right))) The result is a nicely formatted table. It appears that log5 is very flexible, contexts are a cool feature ! 1. suggestion: A push-context command in a source file adds the same context to the list when the file is reloaded/recompiled. Wouldn't it be better to have something like push-new here ? 2. I wanted to give http://www.flogviewer.com/ a try for viewing the logfile since it has filters etc. The problem I have is that individual log messages can include many line breaks generated by I don't know what. This is not a problem when logging to a html file, but flogviewer expects one line per message. I tried everthing mentionned in cltl2 relating to *print-right-margin*, *print-miser-width* etc to switch this behaviour off, without success. I am not able to find out where the line breaks come from. Could you give me a hint please ? Best regards Frank _______________________________________________________________ SMS schreiben mit WEB.DE FreeMail - einfach, schnell und kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192 From gwking at metabang.com Wed Apr 11 15:48:47 2007 From: gwking at metabang.com (Gary King) Date: Wed, 11 Apr 2007 11:48:47 -0400 Subject: [log5-devel] feedback and question In-Reply-To: <487236577@web.de> References: <487236577@web.de> Message-ID: Hi Frank, I really appreciate your feedback and your use of defoutput for HTML is very clever! As for your suggestions: > A push-context command in a source file adds the same context to > the list when the file > is reloaded/recompiled. Wouldn't it be better to have something > like push-new here ? Yes, I'll make that change > 2. I wanted to give http://www.flogviewer.com/ a try for viewing > the logfile since it has filters etc. Thanks for the link, I wasn't aware of this (though I can't use it since I'm an OS X kind of guy) > The problem I have is that individual log messages can include many > line breaks generated by I don't know what. > This is not a problem when logging to a html file, but flogviewer > expects one line per message. > I tried everthing mentionned in cltl2 relating to *print-right- > margin*, *print-miser-width* etc to switch this > behaviour off, without success. I am not able to find out where the > line breaks come from. I think that this is a pretty-printing problem. It may be fixed in my sources. I'll try to get an update out later today. Work has been crazy lately which is why there hasn't been another release. Again, thanks for you comments and ideas. On Apr 10, 2007, at 6:21 PM, Frank Schorr wrote: > Gary, > this is a feed back of my first use of log5. > Previously I used log4CL with the daily rolling file appender > pruducing a html file to be viewed > with the browser. With browser update (F5) it is easy to read > continously changing logfiles. > > This is what I am now doing with log5: > > (defun prepare-log-file (path) > (with-open-file (s path :direction :output :if-exists :supersede) > ;;stolen from Log4CL and modified > (format s " Log5 Log Messages > leftmargin=\"6\">
> Log session start at ~a

>
Time Category Message Context
") (defoutput middle "") (defoutput right "
bordercolor=\"#224466\" width=\"100%\"> > ") > > (defoutput time (formatted-current-time)) > > (defoutput html-message (html-escape message)) > > (prepare-log-file *logfile*) > > (start-sender 'mysender > (stream-sender :location *logfile*) > :category-spec (application pdf) > :output-spec (left time middle category > middle html-message middle context right))) > > The result is a nicely formatted table. > > It appears that log5 is very flexible, contexts are a cool feature ! > > 1. suggestion: > > A push-context command in a source file adds the same context to > the list when the file > is reloaded/recompiled. Wouldn't it be better to have something > like push-new here ? > > 2. I wanted to give http://www.flogviewer.com/ a try for viewing > the logfile since it has filters etc. > > The problem I have is that individual log messages can include many > line breaks generated by I don't know what. > This is not a problem when logging to a html file, but flogviewer > expects one line per message. > I tried everthing mentionned in cltl2 relating to *print-right- > margin*, *print-miser-width* etc to switch this > behaviour off, without success. I am not able to find out where the > line breaks come from. > > Could you give me a hint please ? > > Best regards > Frank > _______________________________________________________________ > SMS schreiben mit WEB.DE FreeMail - einfach, schnell und > kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192 > > _______________________________________________ > log5-devel mailing list > log5-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/log5-devel -- Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM
Time Category Message Context th>" > (date-time-as-string (get-universal-time))))) > > (defparameter *logfile* "C:/lisp/log/mylog.html") > > (defoutput left "
") > (defoutput middle "") > (defoutput right "