Closed agnel-inveox closed 10 months ago
Wildcard import isn't supported
Wildcard import isn't supported
ok. is this the cause of that error? because it did seem to work without any error before I introduced rotateLogWhenDayChanges
.
You should also update the lib to the latest version. A similar issue was fixed two weeks ago.
You should also update the lib to the latest version. A similar issue was fixed two weeks ago.
Makes sense. Will update the lib. and what about the best approach for importing the lib? any suggestions?
And just to confirm the latest lib is 5.0.3
as indicated on npm.
Default export should be used.
It should be fixed in the latest version. Let me know if you still have the issue.
I get an error with electron 17.1.0, when using electron-log 5.0.0 in main process:
I've imported electron-log like this:
below is partial code I'm using in a file
Logger.ts
I'm then importing this exported Logger in other places to log messages, which works pretty well and logs the messages in the log file. But somehow it fails with that
TypeError: ...
message shared at the beginning, when therotateLogFile
method is called in an async function (this functions does nothing but uploads the logs files to a server).Any idea why all of a sudden the
Logger
is undefined after the file is renamed in thearchiveLog
method done using therenameSync
statement in that method ???the signature of that method for uploading logfiles is as follows (defined in the same Logger.ts file):