This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[MethodImpl(MethodImplOptions.NoInlining)] | |
public string GetCurrentMethodName() | |
{ | |
StackTrace st = new StackTrace (); | |
StackFrame sf = st.GetFrame (1); | |
MethodBase method = sf.GetMethod(); | |
return method.DeclaringType.FullName + ':' + sf.GetMethod().Name; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adds timestamps to logs | |
# put it at the end of environment.rb | |
module ActiveSupport | |
class BufferedLogger | |
def add(severity, message = nil, progname = nil, &block) | |
return if @level > severity | |
message = (message || (block && block.call) || progname).to_s | |
level = { | |
0 => "DEBUG", |
NewerOlder