Override logging in thin

627 views Asked by At

I am starting thin in a cluster with 4 thin instances(with Sinatra). It seems that thin creates 4 different log files, one for each instance. I want to override this logging behavior. My requirements :-

  1. Single log file for all thin instances.
  2. Different log files for different aspects of logging(eg. one for requests, another for error etc.)

For this purpose I am thinking of using log4r. Now my question is how exactly do I override this default behavior. Should I simply log everything to my custom logger, but then what about any logs which thin itself generates. How can I replace thin logger with my own custom logger.

0

There are 0 answers