Skip to content

Support named arguments in with logging integration #4477

@AbhiPrasad

Description

@AbhiPrasad

Sentry Feedback: JAVASCRIPT-31PA

Python built-in logging allows named arguments with a dictionary for the first argument

    logging.info(
        "%(source)s call completed, %(input_tk)i input tk, %(output_tk)i output tk (model %(model)s, cost $%(cost).4f, time %(time).1f sec, prompt_code %(prompt_code)s)",
        {
            "source": self.source,
            "input_tk": self.input_tokens or 0,
            "output_tk": self.output_tokens or 0,
            "model": self.model,
            "cost": self.cost,
            "time": self.timer.elapsed_seconds if self.timer else 0,
            "prompt_code": self.prompt_code or "-",
        },
    )

These should be picked up as parameters, but they don't seem to be.

The template came through, but the but the parameters weren't included.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy