Skip to content
This repository has been archived by the owner on Jul 10, 2021. It is now read-only.

Disable captured logging #34

Closed
hurrycane opened this issue Jan 7, 2013 · 1 comment
Closed

Disable captured logging #34

hurrycane opened this issue Jan 7, 2013 · 1 comment

Comments

@hurrycane
Copy link

Hi,

I'm building a small library to send notifications for successful/failed tests via GNTP. I've written a small nose plugin that when the nose suite finishes is sends the desired message.

My issue is that when a test fails the GNTP library outputs some debugging information similar to this:

-------------------- >> begin captured logging << --------------------
gntp.notifier: INFO: Sending registration to localhost:23053
gntp.notifier: DEBUG: To : localhost:23053 <<class 'gntp.GNTPRegister'>>
GNTP/1.0 REGISTER NONE
Application-Name: Success!
Origin-Platform-Version: Darwin-12.2.1-x86_64-i386-64bit
Origin-Software-Version: 0.8
Origin-Machine-Name: Bogdans-MacBook-Air.local
...
gntp.notifier: DEBUG: From : localhost:23053 <<class 'gntp.GNTPOK'>>
GNTP/1.0 -OK NONE
Response-Action: NOTIFY

Is there a way to suppress this output as it pollutes the nose output for the tests ?

Thanks and thanks for building this awesome library!

@kfdm
Copy link
Owner

kfdm commented Jan 8, 2013

Oh nice. I had tried a nose plugin myself a while back but never finished to push to pip. https://github.com/kfdm/nose-gntp

You should be able to use standard Python logging functions change the logging for the library

import logging
logging.getLogger("gntp").setLevel(logging.WARNING)

@kfdm kfdm closed this as completed Jan 13, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants