O'Reilly logo

Hands-On High Performance with Spring 5 by Dinesh Radadiya, Prashant Goswami, Pritesh Shah, Subhash Shah, Chintan Mehta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Java standard logging

This section explains Java's built-in logging mechanism. The Java logging API is comprised of the java.util.logging package. The core package includes support for writing plain text or XML log entries to output streams, files, memory, the console, or sockets. The logging API is also capable of interacting with already existing logging services on the operating system.

The following code example is used for printing log messages using the standard logging API:

package com.packt.springhighperformance.ch9.logging;import java.io.FileInputStream;import java.io.IOException;import java.sql.Timestamp;import java.util.logging.Level;import java.util.logging.LogManager;import java.util.logging.Logger;public class SampleLoggingOne ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required