Skip to content

Commit

Permalink
Fix format argument in JRuby
Browse files Browse the repository at this point in the history
Logging from JRuby seems to have been subtly broken since the format
argument was [added for the C extension, but not for JRuby][commit].

One of the tests added in the previous commits triggered this.

[commit]: #921
  • Loading branch information
unflxw committed Nov 12, 2024
1 parent 8be7c79 commit ce40e82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/appsignal/extension/jruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def self.lib_extension

# Logging methods
attach_function :appsignal_log,
[:appsignal_string, :int32, :appsignal_string, :pointer],
[:appsignal_string, :int32, :int32, :appsignal_string, :pointer],
:void

# Transaction methods
Expand Down Expand Up @@ -273,10 +273,11 @@ def get_server_state(key)
make_ruby_string state if state[:len] > 0
end

def log(group, level, message, attributes)
def log(group, level, format, message, attributes)
appsignal_log(
make_appsignal_string(group),
level,
format,
make_appsignal_string(message),
attributes.pointer
)
Expand Down

0 comments on commit ce40e82

Please sign in to comment.