Module: Extlib

Defined in:
lib/quickbooks/extlib/logger.rb,
lib/quickbooks/extlib/hook.rb,
lib/quickbooks/extlib/assertions.rb,
lib/quickbooks/extlib/inflection.rb

Overview

Public Merb Logger API

To replace an existing logger with a new one:

Merb::Logger.set_log(log{String, IO},level{Symbol, String})

Available logging levels are

Merb::Logger::{ Fatal, Error, Warn, Info, Debug }

Logging via:

Merb.logger.fatal(message<String>,&block)
Merb.logger.error(message<String>,&block)
Merb.logger.warn(message<String>,&block)
Merb.logger.info(message<String>,&block)
Merb.logger.debug(message<String>,&block)

Logging with autoflush:

Merb.logger.fatal!(message<String>,&block)
Merb.logger.error!(message<String>,&block)
Merb.logger.warn!(message<String>,&block)
Merb.logger.info!(message<String>,&block)
Merb.logger.debug!(message<String>,&block)

Flush the buffer to

Merb.logger.flush

Remove the current log object

Merb.logger.close

Private Merb Logger API

To initialize the logger you create a new object, proxies to set_log.

Merb::Logger.new(log{String, IO},level{Symbol, String})

Defined Under Namespace

Modules: Assertions, Hook, Inflection Classes: Logger

Class Attribute Summary collapse

Class Attribute Details

.loggerObject

Returns the value of attribute logger.



37
38
39
# File 'lib/quickbooks/extlib/logger.rb', line 37

def logger
  @logger
end