Ruby on Rails
Thursday, August 16, 2018
On Tuesday, 14 August 2018 22:53:44 UTC+2, Hassan Schroeder wrote:
On Tue, Aug 14, 2018 at 6:21 AM, belgoros <s.ca...@gmail.com> wrote:
>> Can anybody provide some links to how to set up correctly Lograge,
>> logstash-logger with a Rails API app ? I followed their READMEs but still
>> nothing sent to Kibana :(.
>> config.lograge.logger = LogStashLogger.new(host: ENV['logstash_host'],
>> port: ENV['logstash_port'], verify_hostname: false)
Never used either of these but had a little play.
My impression is that LogStashLogger defaults to a UDP connection,
so you might try with e.g.
LogStashLogger.new(type: :tcp, host: ENV['logstash_host'], ...)
Yeas, I knew that. I tried both tcp and udp, none of them worked. The only one that works is when I specify the type as file:
config.lograge.logger = LogStashLogger.new(type: :file, path: 'log/development.log', sync: true)This way the logs shall be written in Logstash format in development.log.
The question I have not found the answer to is what host and port values should correspond to ? Are they the values of Logstash server ?
HTH,
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/618c250c-cbbd-4ebd-aaaa-47acf3217e88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment