pinojs / pino-tee

🌲 tee pino logs into a file, with multiple levels
MIT License
89 stars 17 forks source link

How to append to files? #4

Closed doasync closed 6 years ago

doasync commented 7 years ago

The files are rewritten on each run. How can I append lines to files?

Here is my code: Gist code example

Can you add -a flag? stackoverflow

https://github.com/pinojs/pino-tee/blob/f13b9bcb79c083689895e274b86ebe782bff9338/tee.js#L71

P.S. I think it should append by default (if files exist). If I want to clear log files, I'd better delete the files myself.