@ckcr4lyf/logger
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i @ckcr4lyf/logger

Weekly Downloads

6

Version

0.0.7

License

MIT

Unpacked Size

5.05 kB

Total Files

5

Last publish

Collaborators

  • ckcr4lyf