Sha256: 8b59d80e078b37061cb6343da0b90b61ae2a2f1f8b4f97a8b49d687540f25eec

Contents?: true

Size: 372 Bytes

Versions: 10

Compression:

Stored size: 372 Bytes

Contents

require 'rbmk/exception'
module RBMK
module Logger

	def self.level; ::Logger::INFO end

	def self.format lvl, ts, prog, msg
		sprintf "%s [%s:%5i] %-5s %s\n", ts.strftime('%F:%T'), ($master ? 'M' : 'w'), Process.pid, lvl, msg
	end

	def self.instance
		require 'logger'
		log = ::Logger.new STDERR
		log.level = level
		log.formatter = method :format
		log
	end

end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rbmk-0.1.1 lib/rbmk/logger.rb
rbmk-0.1.0 lib/rbmk/logger.rb
rbmk-0.1.0.i lib/rbmk/logger.rb
rbmk-0.1.0.g lib/rbmk/logger.rb
rbmk-0.1.0.f lib/rbmk/logger.rb
rbmk-0.1.0.e lib/rbmk/logger.rb
rbmk-0.1.0.d lib/rbmk/logger.rb
rbmk-0.1.0.c lib/rbmk/logger.rb
rbmk-0.1.0.b lib/rbmk/logger.rb
rbmk-0.1.0.a lib/rbmk/logger.rb