Split or Multiple logs?

Hi all!

If you have a rails app using multiple subdomains (or domains), is it
possible to split the production.log file into specific log files per
domain? I.e.: production_subdomain1.log, production_subdomain2.log,
etc? A visit to subdomain1.myapp.com would write to the
production_subdomain1.log file, for example.

Thoughts? Advice? Anyone done something like this?

Thanks,

-Danimal

Danimal wrote:

Hi all!

If you have a rails app using multiple subdomains (or domains), is it
possible to split the production.log file into specific log files per
domain? I.e.: production_subdomain1.log, production_subdomain2.log,
etc? A visit to subdomain1.myapp.com would write to the
production_subdomain1.log file, for example.

Thoughts? Advice? Anyone done something like this?

Why not use a log analyzer for this?

Thanks,

-Danimal

Best,

Hi Marnen!

Thanks for the reply.

A log analyzer would help, of course, but we often find the need to
read through a log file directly. The problem with multiple subdomains
in a single log file, is actions on one subdomain inter-mesh with
actions on another, so reading sequentially becomes very hard.

It seems like it would be neat and clean to simply have separate log
files per subdomain.

I would be open to suggestions on good log analyzers. We run NginX
proxying to Thin.

Thanks,

-Danimal