Revision ea34193f lib/utils.py
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