Commit c82b35b2 authored by Arnaud Fontaine's avatar Arnaud Fontaine

If no log filename is given, display messages on stderr rather than stdout


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@45153 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent da9aa12a
...@@ -166,7 +166,7 @@ class Browser(ExtendedTestBrowser): ...@@ -166,7 +166,7 @@ class Browser(ExtendedTestBrowser):
@param username: Username to be used to log into ERP5 @param username: Username to be used to log into ERP5
@type username: str @type username: str
@param password: Password to be used to log into ERP5 @param password: Password to be used to log into ERP5
@param log_filename: Log filename (stdout if none given) @param log_filename: Log filename (stderr if none given)
@type log_filename: str @type log_filename: str
@param is_debug: Enable or disable debugging (disable by default) @param is_debug: Enable or disable debugging (disable by default)
@type is_debug: bool @type is_debug: bool
...@@ -192,7 +192,7 @@ class Browser(ExtendedTestBrowser): ...@@ -192,7 +192,7 @@ class Browser(ExtendedTestBrowser):
if log_filename: if log_filename:
logging.basicConfig(filename=log_filename, level=logging_level) logging.basicConfig(filename=log_filename, level=logging_level)
else: else:
logging.basicConfig(stream=sys.stdout, level=logging_level) logging.basicConfig(stream=sys.stderr, level=logging_level)
self._logger = logging.getLogger('erp5.utils.test_browser') self._logger = logging.getLogger('erp5.utils.test_browser')
self._is_legacy_listbox = is_legacy_listbox self._is_legacy_listbox = is_legacy_listbox
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment