(metric: MetricRecord<MetricEvent>)
| 29 | |
| 30 | private fd!: number; |
| 31 | private writer!: Bun.FileSink; |
| 32 | private writeQueue = Promise.resolve(); |
| 33 | |
| 34 | constructor(logDir: string, options: FileLogHandlerOptions = {}) { |
| 35 | this.formatter = new BasicLogFormatter(); |
| 36 | this.logFilePath = path.join(logDir, LOG_FILE_NAME); |
| 37 | this.maxLogBytes = options.maxLogBytes ?? DEFAULT_MAX_LOG_BYTES; |
| 38 | this.maxRotatedLogs = options.maxRotatedLogs ?? DEFAULT_MAX_ROTATED_LOGS; |
| 39 |