File: logging.rb [amq-client-1.0.2 Documentation]

Last Modified
  2014-03-02 20:19:47 +0000
Requires

## Description

You can use arbitrary logger which responds to debug, info, error and fatal methods, so for example the logger from standard library will work fine:

AMQ::Client.logging = true AMQ::Client.logger = MyLogger.new(STDERR)

AMQ::Client.logger defaults to a new instance of Ruby stdlib logger.

If you want to be able to log messages just from specified classes or even instances, just make the instance respond to logging and set it to desired value. So for example `Queue.class_eval { def logging; true; end }` will turn on logging for the whole Queue class whereas `queue = Queue.new; def queue.logging; false; end` will disable logging for given Queue instance.