logging : Java Glossary

go to home page L words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish 2008-04-14 by Roedy Green ©1996-2008 Canadian Mind Products
index page for letter ⇒ 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-6clickcounter
ISBN10:2-97003690-8clickcounter
publisher:QOS.ch
published:2003-05-07
by:Ceki Gülcü
UK flag abe books.co.uk abe books.ca Canadian flag
UK flag amazon.co.uk. amazon.ca. Canadian flag
German flag abe books.de chapters.indigo.ca . Canadian flag
German flag amazon.de. abe books.com American flag
French flag abe books.fr amazon.com. American flag
French flag amazon.fr. barnes and noble.com American flag
Italian flag abe books.it powells.com American flag
Spanish flag iberlibro.com abe books anz Australian 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.61] The information on this page is for non-military use only.
You are visitor number 8,891. Military use includes use by defence contractors.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/logging.html J:\mindprod\jgloss\logging.html