Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ieivanov committed Sep 5, 2023
1 parent 5d20110 commit ccfe2db
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion copylot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,24 @@

import logging

def enable_debug_logging(log_filepath = 'copylot_debug_log.txt'):

def enable_debug_logging(log_filepath: str = 'copylot_debug_log.txt'):
"""
Enable debug logging to a text file
Parameters
----------
log_filepath : str
Path to log file, by default 'copylot_debug_log.txt'
"""
# create file handler which logs debug messages
fh = logging.FileHandler(log_filepath)
fh.setLevel(logging.DEBUG)
fh.setFormatter(formatter)

logger.addHandler(fh)


logger = logging.getLogger('copylot')
logger.setLevel(logging.DEBUG)

Expand Down

0 comments on commit ccfe2db

Please sign in to comment.