Skip to content

Latest commit

 

History

History
29 lines (17 loc) · 1.37 KB

README.md

File metadata and controls

29 lines (17 loc) · 1.37 KB

logger

Just made this so I can npm install a very opinionated logger I wrote myself, rather than duplicating it in every project inconsistently.

Current inconsistent writes:

ugh..

Design Philosophy

Just be a highly configurable class

The actual logger will have many options etc. that are all optional to be passed in. On the base, just expose the class and a very naive getLogger() function to instantiate one,

Configuration helper in the parent project

If a project wants to use it, they can write a getLogger() wrapper to create a new class, with params that it prefers, such as:

  • Log to a file
  • Log file location
  • Log format (probably just one of JSON or vanilla string)

This was if just stdio logging is required that is easily possible, but if a project wants to log to files with logic around append vs. truncate or such, its upto them to implement it.