Uh oh!
There was an error while loading. Please reload this page.
[Review please!] Logging refactor / cleanup - #415
Conversation
1da2472 to
d6c9d1eComparelandscape-bot
commented
Nov 23, 2015
|
landscape-bot
commented
Nov 23, 2015
|
dustymabe
commented
Nov 23, 2015
Should the |
landscape-bot
commented
Nov 24, 2015
|
cdrage
commented
Nov 24, 2015
@dustymabe Yeah, it should :), I'll fix that. |
landscape-bot
commented
Nov 24, 2015
|
1ca21f2 to
ffd768aComparesub-mod
commented
Dec 11, 2015
@cdrage also, can journald output be another PR so that we can have some code for me to test with cockpit |
cdrage
commented
Dec 11, 2015
Yup. JournalD will be another PR. At the moment its not possible. I'll update the PR and add a function for cockpit only info messages so you
|
0cc39f4 to
9b7b496Compare1bcee57 to
a9ebb56Compare| return input | ||
| def set_logging(args): |
There was a problem hiding this comment.
Let's modify this to take vars as input. Looks like the few that we use are: verbose, quiet, and logging_output.
That way we aren't coupled to changes in cli/main.py.
8172d95 to
3edb100Comparecdrage
commented
Feb 17, 2016
Okay so I've gone ahead and pushed all my other commits. I have one failing error right now that could be due to a bug in the test suite. Otherwise, good for another review! |
| return | ||
| if code == LOG_LEVELS['debug']: | ||
| msg = "[DEBUG] %6d %0.2f %s" % (os.getpid(), time.time(), msg) |
There was a problem hiding this comment.
After running it a couple of times I feel like the extra output in the debug statements (the pid/time) doesn't really help debug anything any more. We don't run multiprocess so I don't think this is useful. Thoughts?
dustymabe
commented
Feb 18, 2016
So one really nice thing (for me) about the old output is that it included the name of the file in the output: Is there a way to preserve that with the new system? |
e36e4d0 to
e5b9b43Comparecdrage
commented
Feb 18, 2016
Hey all! So I've updated the PR for final review. One thing to note is that I will be removing the syslog logging output provider until a later date. I want to do more thorough testing with that. I've also had to move a few things around in main.py in order to get the logging to output correctly. I checked to see if it would do any harm and from the looks if it, it wouldn't. Otherwise, feel free to review and test! |
| custom_level = LOG_LEVELS[logging_output] | ||
| break | ||
| else: | ||
| custom_level = LOG_LEVELS['default'] |
There was a problem hiding this comment.
LOG_LEVELS is a list right? could we do something like this:
if logging_output in LOG_LEVELS:
custom_level = LOG_LEVELS[logging_output]
else:
custom_level = LOG_LEVELS['default'] There was a problem hiding this comment.
@dustymabe Ahhhhh, forgot Python had that functinon >.> I'll add it
cdrage
commented
Feb 18, 2016
@dustymabe updated based on your comments for the |
dustymabe
commented
Feb 19, 2016
Closing in favor of #565 |
This is a work-in-progress.
It currently looks like this:

DONE!
Review away :)