logging : Java Glossary
home L words local find no local find frame, full screen Google search web for topic jump to footer translate with Babelfish 2008-04-14 by Roedy Green ©1996-2008 Canadian Mind Products
Go to : punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
logging
Dumping out information as a program proceeds to a file. It may be a log of transactions, debugging information or raw material for statistics. This sounds like something mindless that could be entirely handled with println, but by adding sufficient bells and whistles it becomes an entire package unto itself. For example, you control at runtime which logging information you want included using the LogManager class and a configuration file. You have multiple log files, that cycle rather than one big one.

There are logging classes built-in to Java 1.1.4+. Here is how you use them:

Log4J allows channels to stream different classes of messages to different files, and to configure logging behaviour after the code is compiled on a very fine granularity.

Instead of peppering your code with debugging println statements that you remove entirely when you find the bug, with logging you leave the logging/generic debug instrumentation code in place, and turn it on and off, in different parts of the program, to varying degrees of detail, at run time, without having to recompile. You normally leave at least a minimum amount of the logging engaged even in production to help track down trouble and to produce statistics.

Normally small project would not use a formal logging package, but almost any team project will be fitted with a logger.

Learning More

Sun’s JDK Technote Guide on Logging : available:
Sun’s Javadoc on the Logger class : available:
Sun’s Javadoc on the FileHandler class : available:
Sun’s Javadoc on the Level class : available:
Sun’s Javadoc on the SimpleFormatter class : available:
Sun’s Javadoc on the LogManager class : available:

Books

book_cover recommend book⇒The Complete Manual log4j
 paperback
ISBN13:978-2-97003690-6
ISBN10:2-97003690-8clickcounter
publisher:QOS.ch
published:2003-05-07
by:Ceki Gülcü
Canadian flag amazon.ca. amazon.com. American flag
Canadian flag chapters.indigo.ca . powells.com American flag
French flag amazon.fr. barnesandnoble.com American flag
German flag amazon.de. amazon.co.uk. UK flag

CMP_homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.18] Greenpeace
You are visitor number 8,536.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/jgloss/logging.html J:\mindprod\jgloss\logging.html