Tuesday, November 19, 2024
Google search engine
HomeLanguagesJavaLogManager getLogManager() method in Java with Examples

LogManager getLogManager() method in Java with Examples

The getLogManager() method of java.util.logging.LogManager is used to get the global LogManager object

Syntax:

public static LogManager getLogManager()

Parameters: This method does not accepts any parameter.

Return Value: This method returns the global LogManager object.

Below programs illustrate getLogManager() method:




// Java program to illustrate
// LogManager getLogManager() method
  
import java.util.logging.*;
  
public class GFG {
  
    public static void main(String[] args)
    {
  
        // Create LogManager object
        LogManager logManager
            = LogManager.getLogManager();
  
        System.out.println("Global LogManager object: "
                           + logManager);
    }
}


Output:

Global LogManager object: java.util.logging.LogManager@1540e19d

Reference: https://docs.oracle.com/javase/9/docs/api/java/util/logging/LogManager.html#getLogManager–

RELATED ARTICLES

Most Popular

Recent Comments