[log5-devel] feedback and question
Gary King
gwking at metabang.com
Wed Apr 11 15:48:47 UTC 2007
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 "<html><head> <title> Log5 Log Messages </title>
> <style type=\"text/css\">
> <!-- body, table {font-family: arial,sans-serif; font-size: x-small;}
> th {background: #336699; color: #FFFFFF; text-align: left;} -->
> </style> </head> <body bgcolor=\"#FFFFFF\" topmargin=\"6\"
> leftmargin=\"6\"> <hr size=\"1\" noshade>
> Log session start at ~a <br> <br>
> <table cellspacing=\"0\" cellpadding=\"4\" border=\"1\"
> bordercolor=\"#224466\" width=\"100%\">
> <tr> <th>Time</th> <th>Category</th> <th>Message</th> <th>Context</
> th>"
> (date-time-as-string (get-universal-time)))))
>
> (defparameter *logfile* "C:/lisp/log/mylog.html")
>
> (defoutput left "<tr><td>")
> (defoutput middle "</td><td>")
> (defoutput right "</td></td>")
>
> (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
More information about the Log5-devel
mailing list