2012/4/2 lkcl luke <[email protected]>:
> it MUST NOT be imported as "import logging".
>
> if it is "from pyjamas import logging" or "from pyjamas.logging
> import ConsoleHandler" then it is absolutely fine.
Yay! So, we're all set: It is in fact imported that way!
I'm not completey happy yet with the separation of pyjamas.log and
pyjamas.logging; I'd love to see Pyjamas' logging match Python's as
closely as possible. At the moment, "import logging;
logging.debug('bla bla')" prints to the text console by default. This
makes sense for Python. In Pyjamas the default should maybe be
something more browser-bound, maybe the AppendLogger? (AlertLogger is
too disrupting, ConsoleLogger doesn't work with all browsers)
In any case, the log module should go away in favour of the Python
style pyjamas.logging module, I believe. To avoid confusion! (In the
worst case it could go into pyjamas.logging, to be imported as "from
pyjamas.logging import log".)
Any thoughts?
Peter