cabler
TypeScript icon, indicating that this package has built-in type declarations

0.8.5 • Public • Published

Cabler — logs cleanly and simply

Motivations

  • The fundamental to-files logging
  • The common contenders: info, warning, error. And then: heading for notable events in the program flow, debug for separately toggleable detailed tracing and die for instant suicide with a logged message
  • As small as possible, no excess cruft wanted
  • But no good features missed either
  • Tags error outputs with unique ID's for exact cross referencing
  • Timstamped entries, no date-part
    • Cabler is intentionally designed for daily rotated logging — the date is part of the file-structure identification
    • Avoids redundant noise in log
    • Analysis spanning multiple days is an elaborate task. Assumed to be done through tooling / scripting
      • full date timestamp rows should be reconstructed then
  • Prefix-tagged outputs identifies different parts of the system in logging
  • Errors are output both on stdout and stderr, except when streams go to TTY
  • Browser-sympathetic, to avoid troubles in cross-libs
  • Colors are used when output to TTY
    • prefix gets a deterministic color based on the text, using hi-color, which may be rendered as the closest ANSI-color if the terminal doesn't support hi-color / 256c.

Examples

Will get to that... Check the test meanwhile.

Readme

Keywords

none

Package Sidebar

Install

npm i cabler

Weekly Downloads

13

Version

0.8.5

License

ISC

Unpacked Size

38 kB

Total Files

13

Last publish

Collaborators

  • ozra