kszarlej

Activity Graph

Page 1 of 1

2016-06-15

[18:33:04] kszarlej: Quit: leaving

2016-04-28

[12:56:21] kszarlej: I want completly turn my Rails application to log in JSON
[12:56:45] kszarlej: I set already Base.logger and ActiveJob.loger to logstashlogger - but still some of the log messages are plaintext.
[12:56:56] kszarlej: Are there any other loggers that should be set to logstashlogger?

2016-04-21

[14:02:14] kszarlej: hey guys, I am devops and I am wondering what are best practises for logging in Rails applications. One of developers is insists very firmly that Rails app must log everything to one file (both stderr&stdout). And these files are "have to be called" staging.log/production.log and I totally dont understand it. What is your approach and what are best practises in Rails?
[14:04:10] kszarlej: fryguy: but does these "defaults" have some special benefits for rails developers?
[14:07:34] kszarlej: tildes: fire up app using supervisor, apps should all log to STDOUT/STDERR only, and supervisor is supposed to capture both stdout and stderr of app process to disticnt files. (web.log and web.error.log)
[14:09:20] kszarlej: and then they are forwarded to logstash using filebeat
[14:21:55] kszarlej: tbuehlmann: yeah, we want to dockerize rails so logging to stdout is the only way
[14:22:03] kszarlej: reasonable way*
[14:22:21] kszarlej: but I am struggiling with the fact why we want to keep STDERR and STDOUT in one file
[14:24:00] kszarlej: it is possible
[14:27:49] kszarlej: tbuehlmann: the app will log only to stdout anyway
[14:28:08] kszarlej: but puma will log errortraces

2016-04-18

[09:28:48] kszarlej: has joined #ruby
[09:29:49] kszarlej: hey guys! I use Rails. Is there any possibility to make Rails ActiveRecord log in pure json so I can forward its logs to logstash?
[09:30:07] kszarlej: I use logstashlogger but still many of the activejob logs are in plaintext
[09:30:16] kszarlej: I assume activerecord has its own logger
[09:33:38] kszarlej: czy /j #RubyOnRails
[09:33:45] kszarlej: has joined #RubyOnRails
[09:36:40] kszarlej: hey guys! Is there any possibility to make Rails ActiveRecord log in pure json so I can forward its logs to logstash? I have config.logger = LogStashLogger.new and most of the logs are in json but activerecord debug SQL are in plaintext
[09:37:05] kszarlej: I assume activerecord has its own logger
[09:38:34] kszarlej: yeah, hey everyone! :D