(text)
| 15 | |
| 16 | // Default: non-blocking append for medium traffic |
| 17 | function write_to_log_file(text) { |
| 18 | fs.appendFile(log_file, text + '\n', 'utf8', (err) => { |
| 19 | if (err) console.error('Failed to write to log file:', err); |
| 20 | }); |
| 21 | } |
| 22 | |
| 23 | /* |
| 24 | // High-traffic mode (optional) |