Javatpoint Logo
Javatpoint Logo

Java System getLogger() Method

The getLogger() method of Java System class returns instance of logger. This instance can be used for caller's use.

Syntax

Parameter

name - name of the logger

Returns

  1. It returns instance of System.Logger, which can be used by the calling class.
  2. If name is null then a NullPointerException is thrown.
  3. If there is no Java caller frame on the stack then an IllegalCallerException is thrown.

Example 1

Test it Now

Output:

Your Logger info is 'java.util.logging.Logger@5c647e05' . 

Example 2

Test it Now

Output:

global

Next TopicJava System



Help Others, Please Share

facebook twitter pinterest