Module java.base
Package java.lang

Class System.LoggerFinder

java.lang.Object
java.lang.System.LoggerFinder
Enclosing class:
System

public abstract static class System.LoggerFinder extends Object
The LoggerFinder service creates, manages and configures loggers to the underlying framework it uses.
  • Constructor Details

    • LoggerFinder

      protected LoggerFinder()
      Checks needed runtime permissions
      Throws:
      SecurityException - if RuntimePermission("loggerFinder") is not allowed
  • Method Details

    • getLocalizedLogger

      public System.Logger getLocalizedLogger(String loggerName, ResourceBundle bundle, Module callerModule)
      Returns a localizable instance of Logger for the given module
      Parameters:
      loggerName - The name of the logger
      bundle - A resource bundle; can be null
      callerModule - The module for which the logger is being requested
      Returns:
      an instance of Logger
      Throws:
      NullPointerException - if loggerName or callerModule is null
      SecurityException - if RuntimePermission("loggerFinder") is not allowed
    • getLogger

      public abstract System.Logger getLogger(String loggerName, Module callerModule)
      Returns an instance of Logger for the given module
      Parameters:
      loggerName - The name of the logger
      callerModule - The module for which the logger is being requested
      Returns:
      a Logger suitable for use within the given module
      Throws:
      NullPointerException - if loggerName or callerModule is null
      SecurityException - if RuntimePermission("loggerFinder") is not allowed
    • getLoggerFinder

      public static System.LoggerFinder getLoggerFinder()
      Returns the LoggerFinder instance
      Returns:
      the LoggerFinder instance.
      Throws:
      SecurityException - if RuntimePermission("loggerFinder") is not allowed