-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request for --logging-level=INFO to limit logging capture #21
Comments
I have the same problem using nosetests fenics; debug level logging prints and enormous amount of internal data structures etc. For now just using --nologcapture, but would be nice to be able to change the level rather than just disabling. Google Code Info: |
I mean nosetests with fenics based code :) Google Code Info: |
Ran into the same issue. Here's a diff of a solution. diff -r 43d9088a4553 nose/plugins/logcapture.py
@@ -186,7 +191,7 @@
Google Code Info: |
Added logcapture.py Google Code Info: |
Awesome, thanks for starting a patch! It looks like it just needs a translation between readable logging levels and numeric levels. As is, I don't see how it would work because the value of logging.NOTSET is actually 0 not 'NOTSET'. Google Code Info: |
No worries. I think getattr(logging, self.loglevel) does what we want here. Right? @@ -186,7 +191,7 @@
Google Code Info: |
Can we please add this patch? So annoying with out it. Google Code Info: |
could you add a unit or functional test for this? thanks Google Code Info: |
http://code.google.com/p/python-nose/issues/detail?id=268 has an incomplete patch (tests needed) |
Should this issue be closed now it is available as part of the logcapture plugin? |
I verified this feature on nose 1.3.7. But you should specify -s option before --logging-level=INFO. |
What steps will reproduce the problem?
What is the expected output? What do you see instead?
As expected, logging messages at all levels are captured including DEBUG.
But it would be nice if one could limit the level like this:
nosetests --logging-level=INFO
Then only messages at that level or above would be captured. What should
happen to the messages beneath that level? They should probably be
swallowed I think. The problem to solve is that the nose captured output
can grow enormously with the DEBUG level and can become hard to read.
What version of the product are you using? On what operating system?
0.11
Please provide any additional information below.
http://somethingaboutorange.com/mrl/projects/nose/0.11.1/plugins/logcapture.html
Google Code Info:
Issue #: 268
Author: kumar.mcmillan
Created On: 2009-05-21T15:41:17.000Z
Closed On:
The text was updated successfully, but these errors were encountered: