Open thegagne opened 4 years ago
@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)
It would be great to have an example that works with flask.