
jruby.rack.servlet_log.rb Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jruby-rack Show documentation
Show all versions of jruby-rack Show documentation
A servlet bridge for (Ruby-based) Rack applications that allow them
to run in Java Application servers using JRuby.
#--
# Copyright (c) 2010-2012 Engine Yard, Inc.
# Copyright (c) 2007-2009 Sun Microsystems, Inc.
# This source code is available under the MIT license.
# See the file LICENSE.txt for details.
#++
module JRuby
module Rack
class ServletLog
def initialize(context = JRuby::Rack.context)
raise ArgumentError, "no context" unless context
@context = context
end
def puts(msg)
write msg.to_s
end
def write(msg)
@context.log(msg)
end
def flush
end
def close
end
end
end
end
© 2015 - 2025 Weber Informatics LLC | Privacy Policy