Class: JRuby::Rack::GrizzlyLog
- Inherits:
-
Object
- Object
- JRuby::Rack::GrizzlyLog
- Defined in:
- lib/jruby/rack/grizzly_helper.rb
Instance Method Summary collapse
- #close ⇒ Object
- #flush ⇒ Object
-
#initialize(logger = $logger) ⇒ GrizzlyLog
constructor
A new instance of GrizzlyLog.
- #puts(msg) ⇒ Object
- #write(msg) ⇒ Object
Constructor Details
#initialize(logger = $logger) ⇒ GrizzlyLog
Returns a new instance of GrizzlyLog.
127 128 129 |
# File 'lib/jruby/rack/grizzly_helper.rb', line 127 def initialize(logger = $logger) @logger = logger end |
Instance Method Details
#close ⇒ Object
144 |
# File 'lib/jruby/rack/grizzly_helper.rb', line 144 def close; end |
#flush ⇒ Object
143 |
# File 'lib/jruby/rack/grizzly_helper.rb', line 143 def flush; end |
#puts(msg) ⇒ Object
130 131 132 |
# File 'lib/jruby/rack/grizzly_helper.rb', line 130 def puts(msg) write msg.to_s end |
#write(msg) ⇒ Object
134 135 136 137 138 139 140 141 |
# File 'lib/jruby/rack/grizzly_helper.rb', line 134 def write(msg) case $gf_ruby_log_level when 3,4,5 then @logger.severe("#{msg}") when 2 then @logger.warning("#{msg}") when 0,1 then @logger.info("#{msg}") else @logger.info("#{msg}") end end |