Your tasks effectively run inside an instance of Capistrano::Configuration. What you're doing here (in your code) is instantiating a new instance of the Configuration and setting a logger to _that_ instance, which has nothing to do with the current task execution.
Instead, I would suggest doing something like (assuming you're inside a run instance): require 'capistrano' require 'capistrano/logger' output = '/var/log/capistrano.log' custom_logger = Capistrano::Logger.new(:output => output) custom_logger.level = Capistrano::Logger::TRACE self.logger = custom_logger (No, I haven't actually tested this... but it looks about right.) Mason On May 2, 2008, at 5:44 PM, SergioB wrote: > > Hi, > > I'm trying to capture Capistrano's output to a log file but it's not > doing it. I have the following on my /etc/capistrano.conf > > require 'capistrano' > require 'capistrano/logger' > > output = '/var/log/capistrano.log' > config = Capistrano::Configuration.new > config.logger = Capistrano::Logger.new(:output => output) > logger.level = 3 > > > No errors. The log files is just empty. Does anybody know why? > > Serge > > > > > --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
