Skip to content

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

Closed as not planned
Closed as not planned

Description

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    0.2Issues which were filed before re-arch to 0.4loggingrelated to logging issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions