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 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) ©1996-2009 2008-04-14 Roedy Green, Canadian Mind Products
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 Logger class : available:
Sun’s Javadoc on FileHandler class : available:
Sun’s Javadoc on Level class : available:
Sun’s Javadoc on SimpleFormatter class : available:
Sun’s Javadoc on LogManager class : available:

Books

book cover recommend book⇒The Complete Manual log4j
 paperback
ISBN13:978-2-97003690-6impressioncounter
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 sony e-books American flag
Australian flag abe books anz

CMP homejump to top You can get the freshest 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
CMP logofeedback Please email your feedback for publication, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.191.106]
You are visitor number 10,767.