Logger taken from Merb :)
To replace an existing logger with a new one:
DataObjects::Logger.set_log(log{String, IO},level{Symbol, String})
Available logging levels are
DataObjects::Logger::{ Fatal, Error, Warn, Info, Debug }
Logging via:
DataObjects.logger.fatal(message<String>) DataObjects.logger.error(message<String>) DataObjects.logger.warn(message<String>) DataObjects.logger.info(message<String>) DataObjects.logger.debug(message<String>)
Flush the buffer to
DataObjects.logger.flush
Remove the current log object
DataObjects.logger.close
To initialize the logger you create a new object, proxies to set_log.
DataObjects::Logger.new(log{String, IO},level{Symbol, String})
Logger will not create the file until something is actually logged This avoids file creation on DataObjects init when it creates the default logger.
URI | = | Struct.new(:scheme, :user, :password, :host, :port, :path, :query, :fragment) |
VERSION | = | "0.9.11" unless defined?(DataObjects::VERSION) |
logger | [RW] |