Title: Java-Logging-Lesson 3-Logging using XMLFormatter, FileHandler and Filter
Duration: 17 minutes
Summary: In this video, we continue the discussion of logging in Java. In the first example, we show the use of the XMLFormatter. We log the data to a file using the FileHandler, but we formatted the data as xml. In the second example, we showed the use of multiple handlers (the FileHandler and the ConsoleHandler). And, in the last example, we show the use of using filters. By adding a new filter, we are able to determine whether a message a loggable or not. Then we log messages as we have done in previous examples.
Methodology of the development of example: Good coding standard and simplified design to illustrate the key points.
Technology Used: Java - Logging
Keywords: java.util.logging, Logger, getLogger, severe, warning, info, LogRecord, Level, log, logp, setFormatter, XMLFormatter, LogManager, getLogManager, setUseParentHandlers.