Revision ea34193f
b/lib/cli.py | ||
---|---|---|
483 | 483 |
_YESNO = ("yes", "no") |
484 | 484 |
_YORNO = "yes|no" |
485 | 485 |
|
486 |
DEBUG_OPT = cli_option("-d", "--debug", default=False, |
|
487 |
action="store_true", |
|
488 |
help="Turn debugging on") |
|
486 |
DEBUG_OPT = cli_option("-d", "--debug", default=0, action="count", |
|
487 |
help="Increase debugging level") |
|
489 | 488 |
|
490 | 489 |
NOHDR_OPT = cli_option("--no-headers", default=False, |
491 | 490 |
action="store_true", dest="no_headers", |
b/lib/utils.py | ||
---|---|---|
1762 | 1762 |
return port |
1763 | 1763 |
|
1764 | 1764 |
|
1765 |
def SetupLogging(logfile, debug=False, stderr_logging=False, program="",
|
|
1765 |
def SetupLogging(logfile, debug=0, stderr_logging=False, program="",
|
|
1766 | 1766 |
multithreaded=False, syslog=constants.SYSLOG_USAGE): |
1767 | 1767 |
"""Configures the logging module. |
1768 | 1768 |
|
1769 | 1769 |
@type logfile: str |
1770 | 1770 |
@param logfile: the filename to which we should log |
1771 |
@type debug: boolean
|
|
1772 |
@param debug: whether to enable debug messages too or
|
|
1771 |
@type debug: integer
|
|
1772 |
@param debug: if greater than zero, enable debug messages, otherwise
|
|
1773 | 1773 |
only those at C{INFO} and above level |
1774 | 1774 |
@type stderr_logging: boolean |
1775 | 1775 |
@param stderr_logging: whether we should also log to the standard error |
Also available in: Unified diff