Skip to content

Commit

Permalink
feat: add logger setup and move it to main function
Browse files Browse the repository at this point in the history
- Add a call to `setup_logger` function in the `main` function
- Move the `setup_logger` call from the `if __name__ == "__main__"` block to the `main` function
- This change ensures that the logger is set up before any other code runs, improving logging consistency
  • Loading branch information
PriNova committed May 2, 2024
1 parent 2f62f69 commit d1c5ab8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def collect_documentation_files(codebase_dir):


def main(codebase_dir=None, output_dir=None):
setup_logger("CodyArchitect", "logs")
if codebase_dir is None:
# Create a command-line interface (CLI) for the program
parser = argparse.ArgumentParser(description="CodyArchitect")
Expand Down Expand Up @@ -79,7 +80,5 @@ def main(codebase_dir=None, output_dir=None):


if __name__ == "__main__":

setup_logger("CodyArchitect", "logs")
codebase_dir = "."
main(codebase_dir)

0 comments on commit d1c5ab8

Please sign in to comment.