Write log output to file

Repository details (botten-nappet)
Project page
botten-nappet
Project log category
(195 entries)
Owner
@joelpurra
Contributors
Contributors on Github
Project status
💤 This project is inactive.
📂 This project is open.
🤷 This project is not particularly popular.
Repository activity period
🗓
Commits
209 commits
Stars
5 stars
Commit details (259aebfb)
Author
Authored at
Committer
Joel Purra
Committed at

Commit message

Write log output to file

  • In nodejs stdout can get closed prematurely (before the synchronous exit event).
  • When stdout closes, logging breaks.
  • Using a separate file works better, and stop/disconnect logging messages can get logged.
  • Separately, pino would forcefully and synchronously terminate the nodejs application when shutting itself down (SIGTERM, beforeExit, uncaughtException, etcetera).
  • This would break the ShutdownManager and other attempts cleanly exit the application, including cleanly closing network connections etcetera.
  • The solution is to override and ignore the onTerminated configurable function for pino.
Raw text
Write log output to file

- In nodejs `stdout` can get closed prematurely (before the synchronous `exit` event).
- When `stdout` closes, logging breaks.
- Using a separate file works better, and stop/disconnect logging messages can get logged.
- Separately, pino would forcefully and synchronously terminate the nodejs application when shutting itself down (`SIGTERM`, `beforeExit`, `uncaughtException`, etcetera).
- This would break the `ShutdownManager` and other attempts cleanly exit the application, including cleanly closing network connections etcetera.
- The solution is to override and ignore the `onTerminated` configurable function for pino.

Changed files (3)

Path Additions Deletions
README.md +2 -1
index.js +16 -4
src/util/pino-logger.js +10 -5

Commit categories (3)