# Namespace goog.debug.LogManager

code »

There is a single global LogManager object that is used to maintain a set of shared state about Loggers and log services. This is loosely based on the java class java.util.logging.LogManager.

Show:Public Protected Private

## Global Functions

code »goog.debug.LogManager.createFunctionForCatchErrors ( opt_logger ) ⇒ `function(Object)`

Creates a function that can be passed to goog.debug.catchErrors. The function will log all reported errors using the given logger.

Parameters

opt_logger: `goog.debug.Logger=`
  The logger to log the errors to. Defaults to the root logger.

Returns

The created function.

code »goog.debug.LogManager.createLogger_ ( name ) ⇒ `!goog.debug.Logger`

Creates the named logger. Will also create the parents of the named logger if they don't yet exist.

Parameters

name: `string`
  The name of the logger.

Returns

The named logger.

code »goog.debug.LogManager.getLogger ( name ) ⇒ `!goog.debug.Logger`

Finds a named logger.

Parameters

name: `string`
  A name for the logger. This should be a dot-separated name and should normally be based on the package name or class name of the subsystem, such as goog.net.BrowserChannel.

Returns

The named logger.

code »goog.debug.LogManager.getLoggers ( ) ⇒ `!Object.<string>`

Returns all the loggers.

Returns

Map of logger names to logger objects.

code »goog.debug.LogManager.getRoot ( ) ⇒ `!goog.debug.Logger`

Returns the root of the logger tree namespace, the logger with the empty string as its name.

Returns

The root logger.

code »goog.debug.LogManager.initialize ( )

Initializes the LogManager if not already initialized.

## Global Properties

code »goog.debug.LogManager.loggers_ : `!Object.<string>`

Map of logger names to logger objects.

code »goog.debug.LogManager.rootLogger_ : `goog.debug.Logger`

The root logger which is the root of the logger tree.