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..
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,
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.