shadabahmed / logstasher

Awesome rails logs
MIT License
817 stars 136 forks source link

What type of objects can we pass as custom fields ? #139

Open mukesh4139 opened 7 years ago

mukesh4139 commented 7 years ago

I have following code initializer/logstasher.rb

fields[:user] = { id: current_user.id, firstname: current_user.firstname, lastname: current_user.lastname, email: current_user.email }

In production mode, in my logs, there are few entries of the following error:

E, [2017-07-06T06:18:48.957782 #29791] ERROR -- : Could not log "process_action.action_controller" event. SystemStackError: stack level too deep ["/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/logstasher-0.9.0/lib/logstasher/active_support/log_subscriber.rb:100"]

Sometimes there are more than 100 lines of same error. Once I restart my server I start to get right logs, but after few hours or days it starts to give same error.