An object used to log debugging messages. Loggers use a hierarchical, dot-separated naming scheme. For instance, "foo" is considered the parent of the "foo.bar" and an ancestor of "foo.bar.baz".
Each logger may be assigned a log level, which controls which level of messages will be reported to the handlers attached to this instance. If a log level is not explicitly set on a logger, it will inherit its parent.
This class should never be directly instantiated. Instead, users should obtain logger references using the getLogger() function.
| Name | Type | Attributes | Description |
|---|---|---|---|
name | string | the name of this logger. | |
opt_level | Level | <optional> | the initial level for this logger. |
Adds a handler to this logger. The handler will be invoked for each message logged with this instance, or any of its descendants.
| Name | Type | Description |
|---|---|---|
handler | function | the handler to add. |
Logs a message at theLevel.DEBUG log level.
| Name | Type | Description |
|---|---|---|
loggable | string | | the message to log, or a function that will return the message. |
Logs a message at theLevel.FINE log level.
| Name | Type | Description |
|---|---|---|
loggable | string | | the message to log, or a function that will return the message. |
Logs a message at theLevel.FINER log level.
| Name | Type | Description |
|---|---|---|
loggable | string | | the message to log, or a function that will return the message. |
Logs a message at theLevel.FINEST log level.
| Name | Type | Description |
|---|---|---|
loggable | string | | the message to log, or a function that will return the message. |
the effective level for this logger.
the log level for this logger.
the name of this logger.
Logs a message at theLevel.INFO log level.
| Name | Type | Description |
|---|---|---|
loggable | string | | the message to log, or a function that will return the message. |
| Name | Type | Description |
|---|---|---|
level | Level | the level to check. |
whether messages recorded at the given level are loggable by this instance.
Logs a message at the given level. The message may be defined as a string or as a function that will return the message. If a function is provided, it will only be invoked if this logger's effective log level includes the givenlevel.
| Name | Type | Description |
|---|---|---|
level | Level | the level at which to log the message. |
loggable | string | | the message to log, or a function that will return the message. |
Removes a handler from this logger.
| Name | Type | Description |
|---|---|---|
handler | function | the handler to remove. |
whether a handler was successfully removed.
| Name | Type | Description |
|---|---|---|
level | Level | the new level for this logger, or |
Logs a message at theLevel.SEVERE log level.
| Name | Type | Description |
|---|---|---|
loggable | string | | the message to log, or a function that will return the message. |
Logs a message at theLevel.WARNING log level.
| Name | Type | Description |
|---|---|---|
loggable | string | | the message to log, or a function that will return the message. |