Skip to content

How to log user? #1472

@jcoyne

Description

@jcoyne

Problem statement

The prevailing advice I've received with regard to logging is to set up a middleware. This works for basic request parameters, however, I'd like to expand my logging to include the user identifier. I am using an API key header to identify the user, so I think I need a way for my logging middleware to be aware of the Principal, or have the authentication handler be aware of the request context.

Does anyone have a suggestion for how this might be accomplished?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions