mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 03:53:39 +08:00

This commit rewrites `DiscourseLogstashLogger` to not be an instance of `LogstashLogger`. The reason we don't want it to be an instance of `LogstashLogger` is because we want the new logger to be chained to Logster's logger which can then pass down useful information like the request's env and error backtraces which Logster has already gathered. Note that this commit does not bother to maintain backwards compatibility and drops the `LOGSTASH_URI` and `UNICORN_LOGSTASH_URI` ENV variables which were previously used to configure the destination in which `logstash-logger` would send the logs to. Instead, we introduce the `ENABLE_LOGSTASH_LOGGER` ENV variable to replace both ENV and remove the need for the log paths to be specified. Note that the previous feature was considered experimental as stated in d888d3c54c4744d52b9d21d3728f5d6dbc132cde and the new feature should be considered experimental as well. The code may be moved into a plugin in the future.