Logger
lkananowicz opened this issue · 7 comments
Hi.
I have a custom setup of Nginx + Puma + jruby 9.0.0.0 + lotusrb app. It seems that there are no logs in files specified in config/puma.rb, neither stdout nor stderr. I asked the similar question on puma/puma#1080 (comment)
and it looks like there is no logging by default with puma in production mode.
Did anyone faced similar issue with jruby or have any ideas how to enable logging in production env?
Thanks
Leon
@lkananowicz thanks for reporting. Can you please let me know what version of Hanami you are running? FYI lotusrb is the old name
Yes, I know the name was changed to Hanami. I am currently on quite an old 0.4.1 version.
@lkananowicz the old version does not support JRuby. and there has been changes in hanami logging code. I highly recommend you try out with a new dummy app to see if the issue persists.
@joneslee85 That's weird, I was using jruby with Hanami version 0.4.1 for about a year now. Anyway, thanks for your help.
@lkananowicz Hi 😄 What @joneslee85 was trying to say is that: we don't support JRuby yet for hanami
gem. So we didn't expected it to work, but that doesn't necessary means that it doesn't. As your experiences teaches us, it works fine.
That being said. At 0.4.1, we didn't had logging facilities yet. Also, if you're looking for automatic logging of rendering, actions, SQL queries, that isn't implemented yet.
@jodosha Thanks for a detailed explanation :). I will think of smth custom then. It would really helpful to see stacktraces when you get 500 errors from your production app 👍
@lkananowicz You can see errors in production. Logging != errors stack trace.
When an exception is raised in production, it isn't suppressed. We put in Rack env under the rack.errors
as per Rack SPEC. Then we also put it in rack.exception
, because it's a de-facto standard for error reporting products like BugSnag.