could you please tell me how to print file name in log in node js.it always print index.js
why ?
here is my code https://codesandbox.io/s/elegant-bassi-ij2e9
[![enter image description here][1]][1]
format: format.combine(
format.label({ label: path.basename(process.mainModule.filename) }),
format.timestamp({
format: "DD-MM-YYYY HH:mm:ss"
}),
[1]: https://i.stack.imgur.com/SVmNe.png
expected
08-01-2020 03:29:33 info [test.js]: --dddabcbbc-
why test.js
is not printed as I mention log in test.js
any update?