more granular memory use logging

This commit is contained in:
albert
2013-02-17 19:29:38 -05:00
parent 88c72cac5c
commit a00f546254
2 changed files with 9 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
ActiveSupport::BufferedLogger.class_eval do
def add_with_memory_info(severity, message = nil, progname = nil, &block)
str = "\t\e[1;31mMemory usage:\e[0m #{Memorylogic.memory_usage}"
add_without_memory_info(severity, message + str, progname, &block)
end
alias_method_chain :add, :memory_info
end