Created
February 28, 2012 00:02
-
-
Save localshred/1928007 to your computer and use it in GitHub Desktop.
Have stdout/err output you just can't track down? Use this. It needs to be inserted in the earliest possible load path (like spec_helper or rails boot.rb)
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
def STDOUT.puts *args | |
super(*args) | |
STDERR.puts(caller[0..5]) if args.any?{|a| a.to_s =~ /my semi-unique string/ } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment