This commit adds a conditional check to file / daily-rotate-file tranports logging function. We check to make that the transport isn't currently in a failed state (i.e failures >= maxRetries) if it is in a failed state then we perform a NOOP and return an error to the logging callback.
This commit only deals with streams created by the transport. Changes: - Adds public property `maxRetries` -> defaults 2 - Adds internal property `failures` -> # of failed stream creation attempts - Transport will attempt to re-create the stream on errors - Will attempt to re-create while `failures < maxRetries`
In this commit file & daily-rotate-file add an 'error' event listener on their stream so that we can emit those errors from the transport. fixes #511
… the Unix one, by default.