[Feature Request]: Implement Query-Engine.log similar to index-engine.log
Do you need to file an issue?
- [X] I have searched the existing issues and this feature is not already filed.
- [X] My model is hosted on OpenAI or Azure. If not, please look at the "model providers" issue and don't file a new one here.
- [X] I believe this is a legitimate feature request, not just a question. If this is a question, please use the Discussions area.
Is your feature request related to a problem? Please describe.
When attempting to run queries which are failing it is hard to understand where the issues are. A logger, similar to the index-engine.log, would really help this.
- [ ]
Describe the solution you'd like
Implement a log, very similar to the index-engine.log, but for querying (local and global).
All the log info/warning messages are already implemented in the query package, so all that needs to happen is to enable a log to save it down in the directory.
I propose:
- create an _enable_logger() in graphrag/query/cli.py (in the same way as the index logger is enabled) in the run_global_search() and run_local_search() methods
- when the logger is created, it creates a new log in root_dir/query_log/query_engine-[method]-[timestamp].log
- To do this run_global_search() and run_local_search() will need to receive "verbose" and "root_dir" arguments, similar to running the index engine.
I would like to create a pull request for this fix. I have implemented this in my cloned repo and is working well.
Thanks
Additional context
I would like to create a pull request for this fix. I have implemented this in my cloned repo and is working well.
Hi @fclarke1
Contributions are welcome :) Please feel free to submit your PR.
Great - I'll submit a PR. Cheers
This issue has been marked stale due to inactivity after repo maintainer or community member responses that request more information or suggest a solution. It will be closed after five additional days.
I've submitted a PR #1037
This issue has been marked stale due to inactivity after repo maintainer or community member responses that request more information or suggest a solution. It will be closed after five additional days.