From dave at interactivemediums.com Fri Mar 21 11:35:31 2008 From: dave at interactivemediums.com (dave farkas) Date: Fri, 21 Mar 2008 10:35:31 -0500 Subject: [ap4r-user] log level settings Message-ID: <47E3D5C3.5030803@interactivemediums.com> Is there a way to change the log level for the queue processes through the config file or command line? I'd like to change it to either INFO or ERROR, since the debug statements are logging too much information. Thanks, Dave From kato.kiwamu at future.co.jp Mon Mar 24 02:28:09 2008 From: kato.kiwamu at future.co.jp (kato.kiwamu at future.co.jp) Date: Mon, 24 Mar 2008 15:28:09 +0900 Subject: [ap4r-user] log level settings In-Reply-To: <47E3D5C3.5030803@interactivemediums.com> References: <47E3D5C3.5030803@interactivemediums.com> Message-ID: <14CE73B79D552644B7CBEF0428763DF604763FE9@045MAIL.future.co.jp> Hi Dave, > Is there a way to change the log level for the queue processes through the config file or command line? At the moment, there is no configuration for log level. If you really want to change the log level, you can rewrite queue_manager_ext.rb . class QueueManager ... def initialize options = nil + logger = Logger.new(STDOUT) + logger.level = Logger::INFO + options[:logger] = logger initialize_original options ... end ... end # Handling log level is in my TODO list. # So some configuration parameter may be introduced in future release. Regards, kiwamu -----Original Message----- From: ap4r-user-bounces at rubyforge.org [mailto:ap4r-user-bounces at rubyforge.org] On Behalf Of dave farkas Sent: Saturday, March 22, 2008 12:36 AM To: ap4r-user at rubyforge.org Subject: [ap4r-user] log level settings Is there a way to change the log level for the queue processes through the config file or command line? I'd like to change it to either INFO or ERROR, since the debug statements are logging too much information. Thanks, Dave _______________________________________________ ap4r-user mailing list ap4r-user at rubyforge.org http://rubyforge.org/mailman/listinfo/ap4r-user From dave at interactivemediums.com Tue Mar 25 12:51:02 2008 From: dave at interactivemediums.com (dave farkas) Date: Tue, 25 Mar 2008 11:51:02 -0500 Subject: [ap4r-user] log level settings In-Reply-To: <14CE73B79D552644B7CBEF0428763DF604763FE9@045MAIL.future.co.jp> References: <47E3D5C3.5030803@interactivemediums.com> <14CE73B79D552644B7CBEF0428763DF604763FE9@045MAIL.future.co.jp> Message-ID: <47E92D76.3090805@interactivemediums.com> Kiwamu, I ended up modifying the queue manager to look for the log_level in the queue.cfg file: queues.cfg: =================================================================== --- +log_level: Logger::INFO store: type: mysql queue_manager_ext.rb =================================================================== class QueueManager . . . def initialize options = nil #:notnew: initialize_original options + @logger.level = eval(@config.log_level) if @config.log_level @global_lock ||= Mutex.new @lifecycle_listeners = [] RetentionHistory.new(self, @logger, @config) This way it doesn't have to be hard coded in the gem. Thanks, Dave kato.kiwamu at future.co.jp wrote: > Hi Dave, > > >> Is there a way to change the log level for the queue processes through the config file or command line? >> > At the moment, there is no configuration for log level. > If you really want to change the log level, you can rewrite queue_manager_ext.rb . > > class QueueManager > ... > def initialize options = nil > + logger = Logger.new(STDOUT) > + logger.level = Logger::INFO > + options[:logger] = logger > initialize_original options > ... > end > ... > end > > > # Handling log level is in my TODO list. > # So some configuration parameter may be introduced in future release. > > Regards, > > kiwamu > > > -----Original Message----- > From: ap4r-user-bounces at rubyforge.org [mailto:ap4r-user-bounces at rubyforge.org] On Behalf Of dave farkas > Sent: Saturday, March 22, 2008 12:36 AM > To: ap4r-user at rubyforge.org > Subject: [ap4r-user] log level settings > > Is there a way to change the log level for the queue processes through the config file or command line? I'd like to change it to either INFO or ERROR, since the debug statements are logging too much information. > > Thanks, > Dave > _______________________________________________ > ap4r-user mailing list > ap4r-user at rubyforge.org > http://rubyforge.org/mailman/listinfo/ap4r-user > > ------------------------------------------------------------------------ > > _______________________________________________ > ap4r-user mailing list > ap4r-user at rubyforge.org > http://rubyforge.org/mailman/listinfo/ap4r-user >