lib/frankenstein/server/webrick_logger.rb in frankenstein-0.2.0.4.g676c8dd vs lib/frankenstein/server/webrick_logger.rb in frankenstein-0.3.0
- old
+ new
@@ -51,9 +51,17 @@
@logger.__send__(sev, @progname) { msg }
end
end
end
+ # Proxy the severity query methods too, because WEBrick likes to check
+ # those directly for... reasons.
+ %i{debug? error? fatal? info? warn?}.each do |sevp|
+ defined_method(sevp) do
+ @logger.__send__(sevp)
+ end
+ end
+
# Simulate the "append literal message" feature
#
# Nothing goes into *my* logs without having appropriate metadata attached,
# so this just funnels these messages into the proper priority-based system.
#