Skip to content

Commit

Permalink
Tweak logging
Browse files Browse the repository at this point in the history
  • Loading branch information
darafferty committed Feb 15, 2016
1 parent 71af054 commit 8ba4048
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions factor/check_progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,20 @@ def run(parset_file, trim_names=True):
"""
global all_directions

# Set logging level to ERROR to suppress extraneous info from parset read
logging.root.setLevel(logging.ERROR)
log.setLevel(logging.ERROR)

# Read in parset and get directions
all_directions = load_directions(parset_file)
if len(all_directions) == 0:
log.error('No directions found. Please check parset')
sys.exit(1)

# Set logging level to normal
logging.root.setLevel(logging.INFO)
log.setLevel(logging.INFO)

# Plot field
log.info('Plotting facets...')
log.info('Left-click on a facet to see its current state')
Expand All @@ -56,10 +64,6 @@ def run(parset_file, trim_names=True):
log.info('(In all cases, pan/zoom mode must be off)')
log.info('Press "u" to update display (display is updated automatically every minute)')

# Set logging level to ERROR to suppress extraneous info
logging.root.setLevel(logging.ERROR)
log.setLevel(logging.ERROR)

plot_state(all_directions, trim_names=trim_names)


Expand Down

0 comments on commit 8ba4048

Please sign in to comment.