logging : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (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 into Java 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

Oracle’s Technote Guide on Logging : available:
Oracle’s Javadoc on Logger class : available:
Oracle’s Javadoc on FileHandler class : available:
Oracle’s Javadoc on Level class : available:
Oracle’s Javadoc on SimpleFormatter class : available:
Oracle’s Javadoc on LogManager class : available:

Books

book cover recommend book⇒The Complete Manual log4jto book home
by Ceki Gülcü 978-2-97003690-6 paperback
publisher QOS.ch
published 2003-05-07
The author is the creator of Log4J.
Australian flag abe books anz abe books.co.uk UK flag
German flag abe books.de amazon.co.uk UK flag
German flag amazon.de abe books.ca Canadian flag
Spanish flag amazon.es amazon.ca Canadian flag
Spanish flag iberlibro.com Chapters Indigo Canadian flag
French flag abe books.fr abe books.com American flag
French flag amazon.fr amazon.com American flag
Italian flag abe books.it Barnes & Noble American flag
Italian flag amazon.it Nook at Barnes & Noble American flag
India flag junglee.com Kobo American flag
UN flag other stores Google play American flag
O’Reilly Safari American flag
Powells American flag
Greyed out stores probably do not have the item in stock. Try looking for it with a bookfinder.

This page is posted
on the web at:

http://mindprod.com/jgloss/logging.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\logging.html
logo
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[54.167.23.178]
You are visitor number