Module: AMQ::Client::Logging

### Home Classes Methods

### In Files

- lib/amq/client/exceptions.rb
- lib/amq/client/logging.rb

### Namespace

- CLASS AMQ::Client::Logging::IncompatibleLoggerError

### Methods

- ::included
- ::logging
- ::logging=
- #debug
- #error
- #fatal
- #info
- #log

### Class/Module Index

Quicksearch

- AMQ
- AMQ::Client
- AMQ::Client::Async
- AMQ::Client::Async::Adapter
- AMQ::Client::Async::Adapter::ClassMethods
- AMQ::Client::Async::AuthMechanismAdapter
- AMQ::Client::Async::AuthMechanismAdapter::External
- AMQ::Client::Async::AuthMechanismAdapter::Plain
- AMQ::Client::Async::Callbacks
- AMQ::Client::Async::Channel
- AMQ::Client::Async::Consumer
- AMQ::Client::Async::CoolioClient
- AMQ::Client::Async::CoolioClient::Socket
- AMQ::Client::Async::Entity
- AMQ::Client::Async::EventMachineClient
- AMQ::Client::Async::Exchange
- AMQ::Client::Async::Extensions
- AMQ::Client::Async::Extensions::RabbitMQ
- AMQ::Client::Async::Extensions::RabbitMQ::Basic
- AMQ::Client::Async::Extensions::RabbitMQ::Basic::ChannelMixin
- AMQ::Client::Async::Extensions::RabbitMQ::Basic::ConsumerMixin
- AMQ::Client::Async::Extensions::RabbitMQ::Basic::QueueMixin
- AMQ::Client::Async::Extensions::RabbitMQ::Confirm
- AMQ::Client::Async::Extensions::RabbitMQ::Confirm::ChannelMixin
- AMQ::Client::Async::ProtocolMethodHandlers
- AMQ::Client::Async::Queue
- AMQ::Client::Async::RegisterEntityMixin
- AMQ::Client::BadLengthError
- AMQ::Client::ConnectionClosedError
- AMQ::Client::ConsumerTagGenerator
- AMQ::Client::Framing
- AMQ::Client::Framing::IO
- AMQ::Client::Framing::IO::Frame
- AMQ::Client::Framing::String
- AMQ::Client::Framing::String::Frame
- AMQ::Client::HandlersRegistry
- AMQ::Client::InconsistentDataError
- AMQ::Client::Logging
- AMQ::Client::Logging::IncompatibleLoggerError
- AMQ::Client::MissingHandlerError
- AMQ::Client::NoFinalOctetError
- AMQ::Client::Openable
- AMQ::Client::Openable::ImproperStatusError
- AMQ::Client::PossibleAuthenticationFailureError
- AMQ::Client::ServerNamedEntity
- AMQ::Client::Settings
- AMQ::Client::TCPConnectionFailed
- AMQ::Client::UnknownExchangeTypeError
- AMQ::Protocol
- AMQ::Protocol::GetResponse

No matching classes.

# AMQ::Client::Logging

### Constants

REQUIRED_METHODS

### Public Class Methods

included(klass) click to toggle source

    # File lib/amq/client/logging.rb, line 14
    def self.included(klass)
      unless klass.method_defined?(:client)
        raise NotImplementedError.new("Class #{klass} has to provide #client method!")
      end
    end

logging() click to toggle source

    # File lib/amq/client/logging.rb, line 20
    def self.logging
      @logging ||= false
    end

logging=(boolean) click to toggle source

    # File lib/amq/client/logging.rb, line 24
    def self.logging=(boolean)
      @logging = boolean
    end

### Public Instance Methods

debug(message) click to toggle source

    # File lib/amq/client/logging.rb, line 30
    def debug(message)
      log(:debug, message)
    end

error(message) click to toggle source

    # File lib/amq/client/logging.rb, line 38
    def error(message)
      log(:error, message)
    end

fatal(message) click to toggle source

    # File lib/amq/client/logging.rb, line 42
    def fatal(message)
      log(:fatal, message)
    end

info(message) click to toggle source

    # File lib/amq/client/logging.rb, line 34
    def info(message)
      log(:info, message)
    end

### Protected Instance Methods

log(method, message) click to toggle source

    # File lib/amq/client/logging.rb, line 47
    def log(method, message)
      if self.respond_to?(:logging) ? self.logging : AMQ::Client::Logging.logging
        self.client.logger.__send__(method, message)
        message
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.