I’m not sure if this belongs here. It is in reference to an app
“deployed” on my local machine. The general Rails group had no advice
on the topic, though.
I’m in the process of switching from Windows XP to OS X, and since
I’ve moved to OS X my log messages have been incomplete. This timing
may be coincidence, but somehow I doubt it.
Anyway, I’ve tried running my app locally under both webrick and
mongrel with the same results. All I see in my development.log is
something like the following:
DEBUG Wed Feb 07 06:14:37 -0600 2007 (2132)
DEBUG Wed Feb 07 06:14:37 -0600 2007 (2132)
DEBUG Wed Feb 07 06:14:37 -0600 2007 (2132)
DEBUG Wed Feb 07 06:14:37 -0600 2007 (2132)
DEBUG Wed Feb 07 06:14:37 -0600 2007 (2132)
DEBUG Wed Feb 07 06:14:37 -0600 2007 (2132)
DEBUG Wed Feb 07 06:14:37 -0600 2007 (2132)
INFO Wed Feb 07 06:14:37 -0600 2007 (2132)
The debug headers are spitting out, but the debug message is not. So
basically I have zero shot at debugging my app. Anyone know a way to
resolve this?
I’ve moved to OS X my log messages have been incomplete. This timing
DEBUG Wed Feb 07 06:14:37 -0600 2007 (2132)
The debug headers are spitting out, but the debug message is not. So
basically I have zero shot at debugging my app. Anyone know a way to
resolve this?
I’ve solved my problem. Thanks to everyone who read these ramblings -
sorry for bugging you all. Right up front, I did not share all of the
right information because frankly I did not know I had it.
For instance, I did not share that I had redefined the Logger’s
format_message method to improve my logger output. My definition was
as follows:
class Logger
def format_message(severity, timestamp, msg, progname)
“#{severity} #{timestamp} (#{$$})\n #{msg}\n”
end
end
It took me quite a while to figure out what was wrong with the above.
I tried some other folks’ format_message definitions with no luck:
Certainly this problem occurred because I went to a new Ruby version
on my new MacBook and coincidentally Dreamhost upgraded Ruby
recently. So the new format_message method is simply:
class Logger
def format_message(severity, timestamp, progname, msg)
“#{severity} #{timestamp} (#{$$})\n #{msg}\n”
end
end
-Barry
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.