Class: ProxyTester::UiLogger
- Inherits:
-
Object
- Object
- ProxyTester::UiLogger
show all
- Defined in:
- lib/proxy_tester/ui_logger.rb
Instance Method Summary
collapse
Constructor Details
3
4
5
|
# File 'lib/proxy_tester/ui_logger.rb', line 3
def initialize
@logger = ::Logger.new($stderr)
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
26
27
28
|
# File 'lib/proxy_tester/ui_logger.rb', line 26
def method_missing(method, *args, &block)
@logger.public_send method, *args
end
|
Instance Method Details
#level=(l) ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/proxy_tester/ui_logger.rb', line 7
def level=(l)
@logger.level = case l.to_s.to_sym
when :unknown
::Logger::UNKNOWN
when :fatal
::Logger::FATAL
when :error
::Logger::ERROR
when :warn
::Logger::WARN
when :info
::Logger::INFO
when :debug
::Logger::DEBUG
else
::Logger::ERROR
end
end
|