# Want my daemons to have their own logger instance

**URL:** <https://www.ruby-forum.com/t/want-my-daemons-to-have-their-own-logger-instance/193006>\
**Category:** Rails\
**Created:** [August 9, 2010, 10:45pm UTC](https://www.ruby-forum.com/t/want-my-daemons-to-have-their-own-logger-instance/193006 "2010-08-09T22:45:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 9, 2010, 10:45pm UTC](https://www.ruby-forum.com/t/want-my-daemons-to-have-their-own-logger-instance/193006/1 "2010-08-09T22:45:53Z")

</div>

I have a daemon named “sketcher” and I want everything related to the  
“sketcher” program to go to “sketcher.log”

I’ve tried putting  
logger = Logger.new(File.join("#{RAILS\_ROOT}/log", “sketcher.log”)

in the top method of the daemon, but this only succeeds in getting  
messages from that same class into my logger. Most of the log  
messages from ActiveRecord and other classes end up in  
development.log, as usual.

Is there an easy way to redirect all output from each of my daemons  
into their own log files?

Thanks -  
T
