Skip to content

Making the reasons a string would make for more readable logs #24

@sazzer

Description

@sazzer

Currently the cacheobject.Reason type is an int. This works well enough for the library itself, but it's a shame that it doesn't log very well.

For example, right now if parsing a no-store header I get the following log message:

{"level":"warn","reasons":[9],"time":"2021-08-30T17:08:41+01:00","message":"JWK keys are not cacheable"}

The "reasons":[9] part in particular is not very useful.

If the cacheobject.Reason type was instead a human readable string then the log messages here would be much more useful, without actually compromising anything about using the library.

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