Use rails logger
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-10-18 18:21:24 +02:00
parent 79ef9fa6d5
commit 21c6264ea9
3 changed files with 10 additions and 10 deletions

View File

@@ -28,7 +28,7 @@ module NostrManager
client.on :message do |m|
msg = JSON.parse(m) rescue nil
if msg && msg[0] == "EVENT" && msg[2]
puts "#{log_prefix} Event received: #{msg[2]["id"]}"
Rails.logger.debug "#{log_prefix} Event received: #{msg[2]["id"]}"
mutex.synchronize do
event = msg[2]
received_event.signal
@@ -48,7 +48,7 @@ module NostrManager
end
end
rescue Timeout::Error
puts "#{log_prefix} Timeout: No event received within #{TIMEOUT} seconds"
Rails.logger.debug "#{log_prefix} Timeout: No event received within #{TIMEOUT} seconds"
ensure
thread.exit
end