Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #23 from Gagnavarslan/master-log-format
Browse files Browse the repository at this point in the history
Option to set logging format
  • Loading branch information
holmars authored May 8, 2018
2 parents 73361d2 + b83125b commit 558ba68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sst/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#


__version__ = '0.2.9.2'
__version__ = '0.2.9.3'

DEVSERVER_PORT = 8120 # django devserver for internal acceptance tests

Expand Down
5 changes: 4 additions & 1 deletion src/sst/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ def get_common_options():
parser.add_option('--log', '--log-level', dest='log_level',
default='DEBUG',
help=('Set log level for SST logger'))
parser.add_option('--log-format', dest='log_format',
default=' %(asctime)s %(threadName)s %(levelname)s:%(name)s:%(message)s',
help=('Set log format for SST logger'))
parser.add_option('-c', '--concurrency', dest='concurrency',
default=1, type='int',
help='concurrency (number of procs)')
Expand Down Expand Up @@ -176,7 +179,7 @@ def get_opts(get_options, args=None):
cmd_opts.browser_type, browsers.browser_factories.keys())
sys.exit(1)

logging.basicConfig(format=' %(levelname)s:%(name)s:%(message)s')
logging.basicConfig(format=cmd_opts.log_format)
logger = logging.getLogger('SST')

numeric_level = getattr(logging, cmd_opts.log_level.upper(), logging.DEBUG)
Expand Down

0 comments on commit 558ba68

Please sign in to comment.