Custom Runtime Logger
Why are these changes needed?
To support custom logger for the developers.
Related issue number
Issues : #2581
Tasks
- [ ] add the
__init__for theBaseLoggerto define thesession_id. - [ ] add the file log functionality to write the logs into a file.
Checks
- [ ] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation to build and test documentation locally.
- [ ] I've added tests (if relevant) corresponding to the changes introduced in this PR.
- [ ] I've made sure all auto checks have passed.
Codecov Report
Attention: Patch coverage is 70.70707% with 29 lines in your changes are missing coverage. Please review.
Project coverage is 42.89%. Comparing base (
372ac1e) to head (afabe32). Report is 23 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #2596 +/- ##
==========================================
+ Coverage 33.11% 42.89% +9.78%
==========================================
Files 86 87 +1
Lines 9108 9336 +228
Branches 1938 2139 +201
==========================================
+ Hits 3016 4005 +989
+ Misses 5837 4958 -879
- Partials 255 373 +118
| Flag | Coverage Δ | |
|---|---|---|
| unittest | 12.70% <29.29%> (?) |
|
| unittests | 42.19% <70.70%> (+9.07%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@ekzhu do we need different files for logs? as we have a different tables in SqliteLogger.
added some functionalities, any reviews or looks good? can i go ahead with the implementation. Thanks
@ekzhu @sonichi @cheng-tan
@ekzhu @jackgerrits , the issue, ive been facing is. when testing it is adding the duplicate logs. can you help me out. Thanks
@ekzhu @jackgerrits , the issue, ive been facing is. when testing it is adding the duplicate logs. can you help me out. Thanks
this is addressed in the below commit
@ekzhu do we need different files for logs? as we have a different tables in SqliteLogger.
I think a single file is sufficient for a built-in logger.
when testing it is adding the duplicate logs.
Can you expand this a bit more with an example?
when testing it is adding the duplicate logs.
Can you expand this a bit more with an example?
this is solved.
[file_logger] Failed to log event Object of type OpenAIWrapper is not JSON serializable
@ekzhu @jackgerrits @sonichi , how can i solve this error? ive used the to_dict and also the json.dumps
@ekzhu @sonichi @WaelKarkoub @jackgerrits please review the changes.
@ekzhu implemented the tests using tempfile, but the windows build tests are failed, can you please look into the issue. Thanks
cc @sonichi @krishnashed @WaelKarkoub