| Index: chrome/test/kasko/py/kasko/config.py
|
| diff --git a/chrome/test/kasko/py/kasko/config.py b/chrome/test/kasko/py/kasko/config.py
|
| index d572e7117264c1bce16a8d6d9e3c9a62ebaa0bc1..361d20ad0a1fc8cd1b6b78658afd3bcb2cf1f610 100755
|
| --- a/chrome/test/kasko/py/kasko/config.py
|
| +++ b/chrome/test/kasko/py/kasko/config.py
|
| @@ -10,6 +10,7 @@ import os
|
| import optparse
|
|
|
| from kasko.process import ImportSelenium
|
| +from kasko.json_logging_handler import JSONLoggingHandler
|
|
|
|
|
| _LOGGER = logging.getLogger(os.path.basename(__file__))
|
| @@ -46,6 +47,9 @@ def GenerateOptionParser():
|
| help='Specifies the directory where the python installation of webdriver '
|
| '(selenium) can be found. Specify an empty string to use the system '
|
| 'installation. Defaults to $SRC/third_party/webdriver/pylib')
|
| + option_parser.add_option('--log-to-json', type='string',
|
| + help='The path to the JSON file that should be used for the logging. '
|
| + 'Defaults to logging directly to the console.')
|
|
|
| return option_parser
|
|
|
| @@ -76,6 +80,9 @@ def ParseCommandLine(option_parser=None):
|
| # Configure logging.
|
| logging.basicConfig(level=options.log_level)
|
|
|
| + if options.log_to_json:
|
| + logging.getLogger().addHandler(JSONLoggingHandler(options.log_to_json))
|
| +
|
| _LOGGER.debug('Using chrome path: %s', options.chrome)
|
| _LOGGER.debug('Using chromedriver path: %s', options.chromedriver)
|
| _LOGGER.debug('Using webdriver path: %s', options.webdriver)
|
|
|