Skip to content

Commit

Permalink
DEBUGGING
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgate committed Aug 4, 2020
1 parent 048735e commit 8f4cd85
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def __init__(self, name, log_dir, strm_dir=None, html_file=None, indent=0,

# html_file
# ---------
html_text = "<h1>"
if html_file is not None:
self.html_file = html_file.resolve()

Expand All @@ -204,12 +205,13 @@ def __init__(self, name, log_dir, strm_dir=None, html_file=None, indent=0,
if not self.html_file.exists():
logger_name = self.html_file.name
logger_name = re.match("(.*).html$", logger_name).group(1)
html_text = f"<h1>{logger_name} Log</h1>"
html_text += logger_name
else:
# If there isn't an HTML file, this is that parent Logger object,
# and it needs to create the main HTML file.
self.html_file = self.strm_dir / (name.replace(' ', '_') + '.html')
html_text = f"<h1>{self.name} Log</h1>"
html_text += self.name
html_text += " Log</h1>"

# Write the file.
with open(self.html_file, 'w') as f:
Expand Down

0 comments on commit 8f4cd85

Please sign in to comment.