* 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)
| 320 | * @param {function(!Entry)} handler the handler to add. |
| 321 | */ |
| 322 | addHandler(handler) { |
| 323 | if (!this.handlers_) { |
| 324 | this.handlers_ = new Set() |
| 325 | } |
| 326 | this.handlers_.add(handler) |
| 327 | } |
| 328 | |
| 329 | /** |
| 330 | * Removes a handler from this logger. |