Skip to content

Empty Local Directory Created When Using UNC Path with dirname in DailyRotateFile #404

@rfgoncalves90

Description

@rfgoncalves90

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions