Skip to content

Commit

Permalink
chore: adds missing docstings
Browse files Browse the repository at this point in the history
  • Loading branch information
biomadeira committed Sep 20, 2024
1 parent 7e3bcbb commit ddb1ed9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions taxonresolver/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@


def get_logging_level(level: str = "INFO"):
"""Sets a logging level"""
if level == "DEBUG":
return logging.DEBUG
elif level == "INFO":
Expand All @@ -32,6 +33,7 @@ def get_logging_level(level: str = "INFO"):


def load_logging(log_level: str, log_output: str | None = None, disabled: bool = False):
"""Loads logging, outputs to file or disables logging altogether."""
logging.basicConfig(
format="%(asctime)s - [%(levelname)s] %(message)s",
level=get_logging_level(log_level),
Expand All @@ -48,6 +50,7 @@ def load_logging(log_level: str, log_output: str | None = None, disabled: bool =


def print_and_exit(message: str) -> None:
"""Prints a message and exits"""
print(message)
sys.exit()

Expand Down

0 comments on commit ddb1ed9

Please sign in to comment.