I'm maintaining a Rails 3.2 application. The client wants some errors fixed. However, some of them are timeout errors, and the application is multi-user, so using default logging makes it difficult to determine which action is causing them. The client doesn't want an external third-party logging system like Rollbar, so improving the existing logging is the only viable approach.
I'd rather use the logger provided by Rails as opposed to a new gem, to ensure that the change to the application is minimised, rather than degrading performance, adding new errors, or requiring additional maintenance.
I'm having difficulty finding good documentation about tagged logging in any version of Rails, let alone Rails 3.2
The Rails Guide Configuring Rails Applications has some info, but it's not centred around logging.
The Rails Guide "Debugging Rails Applications" mentions the concept of tagged logging, but no specifics. Justin Weiss' article Keeping Your Logs From Becoming an Unreadable Mess is a nice introduction, but doesn't have enough information. It talks about config.log_tags
having options based on attributes from ActionDispatch::Request but the documentation for that class is general purpose, and not opinionated enough to suggest which methods to use, and which ones not to use, and why.
Which tags should I consider using for logging a multi-user Rails application, and which ones should I avoid, and why?
Aucun commentaire:
Enregistrer un commentaire