npm

Need private packages and team management tools?Check out npm Orgs. »

@offirmo/practical-logger-interface

1.1.1 • Public • Published

Offirmo’s practical logger - TypeScript interfaces
Offirmo’s quality seal

npm badge dependencies badge bundle size badge license badge maintenance status badge

This is an internal component of Offirmo’s practical logger.

  • declares only TypeScript types/interfaces
  • No code, 0 bytes = will do nothing to your bundle size.
  • TODO explain the interface pattern

Usage

This is most likely not what you are looking for!

See the actual implementations of those interfaces:

Interface

A logger will have the following interface:

  • setLevel(level: LogLevel): void
  • getLevel(): LogLevel
  • addCommonDetails(hash: Readonly<{ [k: string]: any }>): void
  • Log primitives: (mirroring the log levels)
    • fatal(message?: string, details?: Readonly<{ [k: string]: any }>): void
    • emerg(…) idem
    • alert(…) idem
    • crit(…) idem
    • error(…) idem
    • warning(…), warn(…) idem
    • notice(…) idem
    • info(…) idem
    • verbose(…) idem
    • log(…) idem
    • debug(…) idem
    • trace(…) idem
    • silly(…) idem
  • those functions may not do anything:
    • group(groupTitle?: string): void
    • groupCollapsed(groupTitle?: string): void
    • groupEnd(): void

Concept

Other loggers:

install

npm i @offirmo/practical-logger-interface

Downloadsweekly downloads

3

version

1.1.1

license

Unlicense

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability