Versions
- Logger Version: v1.8.0
- Node Version: v20.11.0
- Operating System: Windows 11
- Terminal: Windows Powershell
Expected Behavior
const clientId = process.env.BOT_CLIENT_ID;
const token = process.env.BOT_TOKEN;
if(!clientId || !token) {
log.error("Missing bot configuration")
process.exit(1)
}
The log must be flushed to file (option write is set to true) before the process exit
Actual Behavior
The process.exit() function stop the program before the log library finish to flush the log to file
Steps to Reproduce
Execute the code in the previously snippet without settings the env variable
Fix
The problem is fixed by making the fse.appenFile() sync changing it to fse.appendFileSync()
Versions
Expected Behavior
The log must be flushed to file (option write is set to true) before the process exit
Actual Behavior
The process.exit() function stop the program before the log library finish to flush the log to file
Steps to Reproduce
Execute the code in the previously snippet without settings the env variable
Fix
The problem is fixed by making the fse.appenFile() sync changing it to fse.appendFileSync()