How do you instrument your code? Almost all of my code runs automatically as scheduled jobs, and I code with the principle that I don't want to see any output at all unless an error or unexpected condition has occurred. If I need to dig into the inner workings of a program, I add debugging statements and then receive the result in my email (from a cron job) or to the terminal (when I run it from the command line).
Meanwhile, the other folks throw all kinds of junk into a log file in
Cary Millsap's Optimizing Oracle Performance remarks that through the years Oracle has provided more and more instrumentation to allow you to figure out what is going on inside. They do a lot of great performance work by parsing Oracle log files and sticking the results into database tables for manipulation.
Meanwhile, from the same folks, I noticed this seminar with an Oracle expert has a one hour session entitled "Instrumentation 101." Sounds like something I'd love, but my interest for some of the rest of the seminar contents is low at this time.
But I really would like to get into instrumenting my programs in a better way. I don't want to spew junk to a log file, and I want to know what happened prior to an error when I receive one in email. It probably all needs to be in the database somewhere. We're already seeing some mandates to start collecting some basic statistics. What do you do?
More about instrumentation from Tom Kyte. (Score:1)
Just a Guess... (Score:2)
-Dom
Another instrumentation class (Score:1)
Log everything, iterate your configs (Score:1)
If you use something like log4perl or Log::Dispatch, as suggested ear