-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Is your feature request related to a problem? Please describe.
We need more detailed information of how xcube server deployments perform.
Describe the solution you'd like
xcube server therefore shall have a new option to output well-structured logs that include key fields such as timestamps, log levels, and unique identifiers. This makes it easier to query and analyze the data.
We'll replace the standard "tornado.access" logs by structured JSON logging that also includes details of the current request.
Example log entry:
{
"timestamp": "2024-08-15T08:59:23Z",
"level": "INFO",
"message": "User login successful",
"user": {
"id": "12345",
"username": "johndoe"
},
"request": {
"method": "POST",
"url": "/api/login",
"status": 200,
"response_time_ms": 123
},
"application": {
"name": "MyApp",
"version": "1.0.0"
},
"environment": "production"
}
Implementing structured logging:
- https://docs.python.org/3/howto/logging-cookbook.html#customizing-logrecord
- https://docs.python.org/3/howto/logging-cookbook.html#implementing-structured-logging
For implementation in Tornado:
Metadata
Metadata
Assignees
Labels
No labels