logfire icon indicating copy to clipboard operation
logfire copied to clipboard

Output span attributes/tags without file info on local console

Open MasterOdin opened this issue 4 months ago • 0 comments

Description

I've setup my app to make heavy use of logfire.span with added attributes, like:

with logfire.span("loading_users", num_users=len(users_data)):
    pass

For local development, I want to see this span with attributes show up in my local console, and so I'm doing:

logfire.configure(
    send_to_logfire=False,
    console=logfire.ConsoleOptions(min_log_level="info", verbose=True),
)

though I get the output:

15:37:40.256     loading_users
             │ tiger_slack/import.py:76
             │ num_users=13070

I would like to see just the attributes be printed out and not the file line as that's extraneous for my needs.

Would be cool to have something like a include_attributes option to logfire.ConsoleOptions (similar to timestamps and tags) to control showing or not.

MasterOdin avatar Oct 15 '25 21:10 MasterOdin