* Adds a handler to this logger. The handler will be invoked for each message * logged with this instance, or any of its descendants. * * @param {function(!Entry)} handler the handler to add.
(handler)
| 323 | * @param {function(!Entry)} handler the handler to add. |
| 324 | */ |
| 325 | addHandler(handler) { |
| 326 | if (!this.handlers_) { |
| 327 | this.handlers_ = new Set() |
| 328 | } |
| 329 | this.handlers_.add(handler) |
| 330 | } |
| 331 | |
| 332 | /** |
| 333 | * Removes a handler from this logger. |