On Wed, Sep 08, 2010 at 03:17:37PM +0200, Stéphane Klein wrote:
> Le 06/09/2010 21:20, Marius Gedminas a écrit :
> >On Mon, Sep 06, 2010 at 06:00:38PM +0200, Ronan Amicel wrote:
> >>Le 6 sept. 2010 ŕ 17:29, Stéphane Klein a écrit :
> >>>By default, markdown module enable log on DEBUG level.
> >...
> >>>17:15:51,715 DEBUG [MARKDOWN] in markdown.markdown(), received text:
> >...
> >>>how can I disable it ?
> >>
> >>Maybe you can add some configuration to your development.ini or
> >>production.ini file, along these lines:
...
> 
> Thanks for your comment but your solution don't work.

Oh, I think I know what causes that.  webhelpers.markdown has this at
top-level scope:

    # Configure debug message logger (the hard way - to support python 2.3)
    logger = getLogger('MARKDOWN')
    logger.setLevel(DEBUG) # This is restricted by handlers later
    console_hndlr = StreamHandler()
    formatter = Formatter('%(name)s-%(levelname)s: "%(message)s"')
    console_hndlr.setFormatter(formatter)
    console_hndlr.setLevel(MESSAGE_THRESHOLD)
    logger.addHandler(console_hndlr)

which means it reconfigures the logging *on import time*, after Paster had set
it up.  There's no easy way to override it :(  I would call that a bug.

Try adding Markdown2 to your list of dependencies, perhaps the newer
version has this fixed.  webhelpers.html.converters will try to import
markdown, falling down to webhelpers.markdown only if the "real" one isn't
available.

(I don't use Markdown myself, so I cannot say for sure this will help.)

Marius Gedminas
-- 
Colorless green ideas sleep furiously.

Attachment: signature.asc
Description: Digital signature

Reply via email to