🧱 BaseLogRotator (Advanced Usage)
You can extend the base class to create custom log formats.
1import { Base } from 'hbh-logrotator';3class CustomRotator extends Base {4 initFile() {5 this.currentStream.write('START\n');6 }8 handleEntry(entry) {9 this.currentStream.write(entry.message + '\n');10 }12 finalizeFile() {13 this.currentStream.write('END\n');14 }15}