On 16/03/12 23:38, Peter Bittner wrote:
> So, I've pushed the changes to all Handler constructors.
>
>    
>> Phil, would be helpful if you could try other loggers too as soon as I
>> have pushed the changes. It's the log.write() and log.writebr()
>> functions that need to be replaced by from pyjamas import logger; log
>> = logger.getXxxxxLogger(); log.debug('bla bla')
>>
>>      
Peter,
  I've done a bit of very rudimentary testing of the various handlers 
under pyjd on Windows
(just AlertLogger, AppendLogger and PrintLogger and everything seemed to 
work. Just one comment. AlertLogger and PrintLogger (and, no doubt, 
ConsoleLogger all work with text but AppendLogger is treating the 
message as HTML.   So, if the record is something like
<Sink.SinkInfo instance at 0x04C5CD28> it doesn't come out. Maybe 
AppendHandler needs to call an escape function to turn things that are 
special characters to HTML into their equivalent HTML entities.
Apart from that, the whole thing is very useful, Many thanks for your 
efforts!
Phil
> Actually, it's "logging" (not logger). The good example is in the new
> FAQ answer (issue #700).
>
>    from pyjamas import logging
>    log = logging.getAlertLogger()   # other loggers: Append, Console, Print 
> ...
>    ...
>    log.error("Hello, here is an error")
>
> If I wanted to write a test for the logging module, where would it have to go?
> There's not much I could test, really; only if creating an object
> works. Better than nothing I guess.
>
> Peter
>    

Reply via email to