java.lang.Object
java.lang.System.LoggerFinder
- Enclosing class:
- System
The LoggerFinder service creates, manages and configures loggers
to the underlying framework it uses.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLocalizedLogger
(String loggerName, ResourceBundle bundle, Module callerModule) Returns a localizable instance of Logger for the given moduleabstract System.Logger
Returns an instance of Logger for the given modulestatic System.LoggerFinder
Returns the LoggerFinder instance
-
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 loggerbundle
- A resource bundle; can be nullcallerModule
- The module for which the logger is being requested- Returns:
- an instance of Logger
- Throws:
NullPointerException
- if loggerName or callerModule is nullSecurityException
- if RuntimePermission("loggerFinder") is not allowed
-
getLogger
Returns an instance of Logger for the given module- Parameters:
loggerName
- The name of the loggercallerModule
- 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 nullSecurityException
- if RuntimePermission("loggerFinder") is not allowed
-
getLoggerFinder
Returns the LoggerFinder instance- Returns:
- the LoggerFinder instance.
- Throws:
SecurityException
- if RuntimePermission("loggerFinder") is not allowed
-