Module: Log::Methods

Included in:
File
Defined in:
lib/log/methods.rb

Overview

Provides convenience mappings to #process Map debug, info, warn, error, fail to log, log itself uses process with Entry.new See Log::File for an example.

Instance Method Summary collapse

Instance Method Details

#debug(text, *args) ⇒ Object



19
20
21
# File 'lib/log/methods.rb', line 19

def debug(text, *args)
	log(text, :debug, *args)
end

#error(text, *args) ⇒ Object



31
32
33
# File 'lib/log/methods.rb', line 31

def error(text, *args)
	log(text, :error, *args)
end

#fail(text, *args) ⇒ Object



35
36
37
# File 'lib/log/methods.rb', line 35

def fail(text, *args)
	log(text, :fail, *args)
end

#info(text, *args) ⇒ Object



23
24
25
# File 'lib/log/methods.rb', line 23

def info(text, *args)
	log(text, :info, *args)
end

#log(*args) ⇒ Object



15
16
17
# File 'lib/log/methods.rb', line 15

def log(*args)
	process(Entry.new(*args))
end

#warn(text, *args) ⇒ Object



27
28
29
# File 'lib/log/methods.rb', line 27

def warn(text, *args)
	log(text, :warn, *args)
end