megahertz/electron-log

How to check when log.error() is called

3s-ThangLD opened this issue · 2 comments

Hi!

I was trying to handle log process to file. For case log file have been block permission (write, modify,..), function log.error() will not update this file contents and not emit error.

How i can check this process? Or check when any log.error() function have been call in application?. Thanks!

image

Under the hood, it calls the console transport directly. The only way to handle such a case outside is to overwrite log.transports.console.writeFn function.

Under the hood, it calls the console transport directly. The only way to handle such a case outside is to overwrite log.transports.console.writeFn function.

It is useful for me. Thank you for your reply!