diff options
Diffstat (limited to 'lib/clogger/pure.rb')
-rw-r--r-- | lib/clogger/pure.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/clogger/pure.rb b/lib/clogger/pure.rb index b871c62..e9a8e6a 100644 --- a/lib/clogger/pure.rb +++ b/lib/clogger/pure.rb @@ -1,13 +1,14 @@ # -*- encoding: binary -*- # :stopdoc: -require 'rack' - # Not at all optimized for performance, this was written based on # the original C extension code so it's not very Ruby-ish... class Clogger def initialize(app, opts = {}) + # trigger autoload to avoid thread-safety issues later on + Rack::Utils::HeaderHash.new({}) + @app = app @logger = opts[:logger] (@logger.sync = true) rescue nil |