[core/config] enable logging into a log file
Re-enable the -f | --logfile parameter, but still default to logging to stderr. Also, add a "debug" module that is automatically displayed if a bar is run in debug mode (thanks to @bbernhard for the excellent suggestion) fixes #614
This commit is contained in:
parent
650942a3e3
commit
595778f7c3
3 changed files with 45 additions and 6 deletions
22
modules/core/debug.py
Normal file
22
modules/core/debug.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# pylint: disable=C0111,R0903
|
||||
|
||||
"""Shows that debug is enabled"""
|
||||
|
||||
import platform
|
||||
|
||||
import core.module
|
||||
import core.widget
|
||||
import core.decorators
|
||||
|
||||
class Module(core.module.Module):
|
||||
@core.decorators.every(minutes=60)
|
||||
def __init__(self, config, theme):
|
||||
super().__init__(config, theme, core.widget.Widget(self.full_text))
|
||||
|
||||
def full_text(self, widgets):
|
||||
return 'debug'
|
||||
|
||||
def state(self, widget):
|
||||
return 'warning'
|
||||
|
||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
Loading…
Add table
Add a link
Reference in a new issue