When using a UNC path as the dirname option in DailyRotateFile, an empty directory is unexpectedly created in the root of the local drive (e.g., D:\SERVERNAME). This occurs even though the actual log files are correctly written to the specified UNC path.
new transports.DailyRotateFile({
format: format.uncolorize(),
filename: "logName",
extension: ".log",
dirname: "\\\\SERVERNAME\\logs",
maxSize: "20m",
maxFiles: "30d",
zippedArchive: true
});
In this example:
Logs are correctly written to: \\SERVERNAME\logs
But an empty folder is also created at: D:\SERVERNAME