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

[Feature Request]: Log thread ID in built-in loggers #2656

Closed
ekzhu opened this issue May 10, 2024 · 8 comments
Closed

[Feature Request]: Log thread ID in built-in loggers #2656

ekzhu opened this issue May 10, 2024 · 8 comments
Labels
0.2 Issues which are related to the pre 0.4 codebase logging related to logging issue

Comments

@ekzhu
Copy link
Collaborator

ekzhu commented May 10, 2024

Is your feature request related to a problem? Please describe.

Currently the built-in loggers do not log the current thread ID. This makes it difficult to differentiate between logs from different threads.

will there be a way to differentiate between the different threads chat completions? Id need to be able to query the sqlite db for all chat completions of a single thread
by @Nathan-Intergral

Describe the solution you'd like

In SQLiteLogger and FileLogger (#2596), add thread ID to each logged event. Obtain thread ID through:

import threading
current_thread_id = threading.get_native_id()
print(f"Current thread ID (native): {current_thread_id}")

Additional context

#2617

@ekzhu ekzhu added enhancement logging related to logging issue labels May 10, 2024
@jtoy
Copy link
Contributor

jtoy commented May 20, 2024

This is merged, can we close this ticket.

@ekzhu
Copy link
Collaborator Author

ekzhu commented May 21, 2024

it is not yet in the SQLIteLogger.

@lucaswh
Copy link
Member

lucaswh commented Aug 21, 2024

If I understand correctly, this threadId logging functionality is available in the FileLogger but not the SQLiteLogger. Is that right, @ekzhu ?

@ekzhu
Copy link
Collaborator Author

ekzhu commented Aug 27, 2024

If I understand correctly, this threadId logging functionality is available in the FileLogger but not the SQLiteLogger. Is that right, @ekzhu ?

Yes

@Nathan-Intergral
Copy link

Hi, i have had to work on other projects for a while but i am back working with autogen again. Was this ever progressed?

@rysweet rysweet added 0.2 Issues which are related to the pre 0.4 codebase needs-triage labels Oct 2, 2024
@ekzhu
Copy link
Collaborator Author

ekzhu commented Oct 3, 2024

@Nathan-Intergral It is available now in the FileLogger autogen-agentchat~=0.2 but not in the SqliteLogger.

@ekzhu ekzhu closed this as completed Oct 3, 2024
@ekzhu ekzhu reopened this Oct 3, 2024
@Nathan-Intergral
Copy link

thanks for the update, i rely on the sqllitelogger in order for me to pull out the details for a custom conversation history gui ive created so ill have to wait for the sqllitelogger to get this enhancement

@ekzhu
Copy link
Collaborator Author

ekzhu commented Oct 13, 2024

Closing this as team is focusing on v0.4 release for new features.

You are welcome to open a new feature request issue for the new logger handlers -- currently SQLite log handler is not supported. We can discuss whether this should be included in the core library, as an extension module, or a community package.

@ekzhu ekzhu closed this as completed Oct 13, 2024
@ekzhu ekzhu reopened this Oct 13, 2024
@ekzhu ekzhu closed this as not planned Won't fix, can't repro, duplicate, stale Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.2 Issues which are related to the pre 0.4 codebase logging related to logging issue
Projects
None yet
Development

No branches or pull requests

5 participants