The goog.debug.LogManager Namespace

goog.debug.LogManager

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.

.createFunctionForCatchErrors(opt_logger)

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

opt_logger {goog.debug.Logger=}
The logger to log the errors to. Defaults to the root logger.
returns {function(Object)}
The created function.

.getLogger(name)

Method to find a named logger.

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 {!goog.debug.Logger}
The named logger.

.getLoggers()

Returns all the loggers

returns {!Object}
Map of logger names to logger objects.

.getRoot()

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

returns {!goog.debug.Logger}
The root logger.

.initialize()

Initialize the LogManager if not already initialized