1

I need to make logging with logstash in Padrino project. I setup logstash on remote server and tried to integrate it with Padrino project, I found only one solution logger = LogStashLogger.new(type: :udp, host: host, port: 5044) if RACK_ENV = 'staging'

but it can working only when use this code logger.debug message: 'test', foo: 'bar'

Can I make that all logs automatically will send to remote server?

Sergii Naumenko
  • 95
  • 1
  • 10

2 Answers2

0

Try this:

Padrino::Logger.logger = LogStashLogger.new(type: :udp, host: host, port: 5044)
0

I use this:

Padrino::Logger.logger = LogStashLogger.new(type: :udp, host: '172.16.x.x', port: 9999).extend(Padrino::Logger::Extensions)
daz
  • 1