Closed chan4est closed 2 years ago
Just tested it and seems to work fine using the test.
Output below.
lrwxr-xr-x 1 user wheel 28 19 Jan 22:36 tail.log -> testlog-2022-01-19.22.36.log
-rw-r--r-- 1 user wheel 282952 19 Jan 22:36 testlog-2022-01-19.22.36.log
The test setup is below.
const symLinkName = 'tail.log'
var rotatingLogStream = require('../FileStreamRotator').getStream({
filename: "logs/1m/testlog-%DATE%",
frequency: "1m",
verbose: true,
date_format: "YYYY-MM-DD.HH.mm",
size: "500k",
max_logs: "10",
audit_file: "/tmp/audit.json",
end_stream: false,
utc: true,
extension: ".log",
create_symlink: true,
symlink_name: symLinkName
});
Creates symlink properly
Fails to create a symlink. Just a regular file with the symlinkName is created