Open JosuerBague opened 7 months ago
I recommend utilizing your system tools to do this https://getpino.io/#/docs/help?id=rotate
check out the pino-roll module.
Hey guys, thanks for the replies. I'm trying out using my system tools for now using a VM, but I'll take a look at the pino-roll module too. Thanks a bunch!
Hi there, I'm new to pino so sorry if my question is very basic.
I'm trying to use a custom transport to log to a file with this format:
application-<year>-<month>-<date>.log
I want it to switch files when the day ends / transfers.Currently I have this in my custom transport:
My logger:
This works for the first file but not for subsequent dates. I understand this is because the custom transport is only called once on initialization and not each time the write functionality is called.
I've been scouring the net for examples for my use case to no avail. Help would be much appreciated.