Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
    update logging instantiation codes to solve issue when invoke the tools/run-fbp-tests with --log option
    refer to: https://docs.python.org/2/library/logging.html#module-level-functions
  • Loading branch information
otcyanglei committed Mar 2, 2016
1 parent 2f997cd commit 58e3181
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tools/run-fbp-tests
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,7 @@ def set_log_level(args):
if not level:
raise ValueError('Invalid log level: %s' % args.log)

root = logging.getLogger()
hdlr = root.handlers[0]
fmt = logging.Formatter('%(message)s')
hdlr.setFormatter(fmt)
hdlr.setLevel(level)
logging.basicConfig(level=level, format='%(message)s')

if __name__ == "__main__":
parser = argparse.ArgumentParser()
Expand Down

2 comments on commit 58e3181

@vcgomes
Copy link

@vcgomes vcgomes commented on 58e3181 Mar 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good. Only a few details missing in the commit message:

@otcyanglei
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I recommit and modify the commit message.

Please sign in to comment.