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

Open
ekzhu opened this issue May 10, 2024 · 2 comments
Open

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

ekzhu opened this issue May 10, 2024 · 2 comments
Labels
enhancement New feature or request 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 New feature or request logging related to logging issue labels May 10, 2024
@jtoy
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request logging related to logging issue
Projects
None yet
Development

No branches or pull requests

2 participants