Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid message in manticore exception logging context #1081

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 11.6.1
- Fixed issue where exceptions logged by the Manticore adapter could be passed both a `message` and a context map including a `message`, resulting in log events that could not be reasonably be parsed when formatted with Log4j2's JSONLayout

## 11.6.0
- Added support for `ca_trusted_fingerprint` when run on Logstash 8.3+ [#1074](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1074)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def perform_request(url, method, path, params={}, body=nil)
end

def log_request_error(e)
details = { message: e.message, exception: e.class }
details = { exception: e.class }
details[:cause] = e.cause if e.respond_to?(:cause)
details[:backtrace] = e.backtrace if @logger.debug?

Expand All @@ -101,7 +101,7 @@ def log_request_error(e)
:info
end

@logger.send level, "Failed to perform request", details
@logger.send level, "Failed to perform request: #{e.message}", details
log_java_exception(details[:cause], :debug) if details[:cause] && @logger.debug?
end

Expand Down
2 changes: 1 addition & 1 deletion logstash-output-elasticsearch.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'logstash-output-elasticsearch'
s.version = '11.6.0'
s.version = '11.6.1'
s.licenses = ['apache-2.0']
s.summary = "Stores logs in Elasticsearch"
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
Expand Down