Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .gitignore and to centralize log configuration #94

Closed
wants to merge 4 commits into from

Conversation

cnm13ryan
Copy link

No description provided.

cnm13ryan and others added 3 commits August 19, 2024 12:44
- Removed redundant logging.basicConfig() calls from `index_app.py`, `app.py`, and `graphrag/graphrag/index/cli.py`.
- Ensured that all logging is now centrally configured in `api.py`.
- Added `FileHandler` in `api.py` to write logs to `logs/api.log`, providing a dedicated log file for easier access and analysis.
- Ensured consistent log output across the application by centralizing the logging configuration.
feat: centralized logging config
@cnm13ryan
Copy link
Author

No .gitignore file was present, so I added one.

The repository had issues with log reading due to scattered configurations, making it difficult to manage logs across the console and application without manual adjustments.

To address this, I centralized the log configuration control in api.py.

I used grep -rE "logging\.(basicConfig|getLogger\(\).addHandler)" to identify relevant files (index_app.py, app.py, cli.py). I removed basicConfig(...) calls and commented out queueHandler in cli.py to prevent duplication.

Now, logs are properly handled in both the console and application, with a new log directory for separate log files. This implementation also highlights issues like #93 and #82.

@cnm13ryan cnm13ryan changed the title feat: add .gitignore Add .gitignore and to centralize log configuration Aug 19, 2024
@cnm13ryan cnm13ryan closed this Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant