Skip to content

Commit

Permalink
Merge pull request #73 from Rajendra-R/logged_metric
Browse files Browse the repository at this point in the history
#71,72 implemeted logged_metric and solve initialize pre/post_hook error
  • Loading branch information
Ravipudi Sai Rajendra Prasad authored Jun 12, 2018
2 parents 79dc23c + 7416006 commit 432a287
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions basescript/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ def dump_metrics(log, interval):
fn(event, type='metric', __grouped__=True, num=n, **d)

def metrics_grouping_processor(logger_class, log_method, event):
if event.get('type') == 'logged_metric':
event['type'] = 'metric'
return event

if event.get('type') != 'metric':
return event

Expand Down Expand Up @@ -435,8 +439,8 @@ def init_logger(
quiet=False,
level='INFO',
fpath=None,
pre_hooks=None,
post_hooks=None,
pre_hooks=[],
post_hooks=[],
metric_grouping_interval=None
):

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_long_description():

long_description = get_long_description()

version = '0.2.5'
version = '0.2.6'
setup(
name="basescript",
version=version,
Expand Down

0 comments on commit 432a287

Please sign in to comment.