Skip to content

Add logger middleware #369

@Yarik-Popov

Description

@Yarik-Popov

Background

We need to add logging middleware to the backend to log all incoming requests and response pairs. This will help with logging/debugging.

Requirements

  • The logging should include the following
    • Time of request
    • User id making request or anonymous if not signed in
    • Request including length
    • Response including length
    • Time length of response
  • Logging should be configurable to be able to disable it for certain endpoints and method combinations
  • Log the severity of the error
  • Include screenshots of the logs in your PR

Use the loguru for logging

Important Information=

For testing purpose you will need to create a simple endpoint as we don't have any endpoints setup yet. It can take a string and return it with some add info. Something like it takes “Hello World” and returns “Hello World Hello World”. Just so that the response and request are different

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions