Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

logbook handler str.format {0} style expansion #260

@temoto

Description

@temoto

Thanks for built-in logbook handler.

logbook allows str.format style parameter expansion, for example: log.error(u"foo: {0} bar: {bar}", 7, bar="ok").

But it breaks with TypeError("not all arguments converted during string formatting"):

    # raven.events.Message.to_string 110:
        return msg['message'] % msg['params']

I haven't yet found best solution, but it would seem that one should use logbook's built-in expansion and not apply % operator later. I would also think that same logic applies to logging handler, since logging also has expansion built-in (although only % style one, probably that's why usually=when-using-logging everything "just works").

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions