ecs-logging-python
ecs-logging-python copied to clipboard
Flask example?
It would be great to have an example that works with flask.
@thegagne did you get a chance to successfully use this for the flask framework?
Here's how I integrated it into Flask, it's simply adding the handler to app.logger which Flask exposes:
# Add an ECS formatter to the Handler
handler = logging.StreamHandler()
handler.setFormatter(ecs_logging.StdlibFormatter())
app.logger.addHandler(handler)