* Flush then destroy connections, close the logger, destroying timers and other resources. * @returns {Promise }
()
| 54 | * @returns {Promise<void>} |
| 55 | */ |
| 56 | close() { |
| 57 | if (this._closed) { |
| 58 | throw new Error('The logger has already been closed.'); |
| 59 | } |
| 60 | |
| 61 | this._closed = true; |
| 62 | this._clearTimer(); |
| 63 | return this.flush(); |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * Enqueue an event in Seq format. |
no test coverage detected