Skip to content

plebbit/plebbit-logger

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example

import Logger from '@plebbit/plebbit-logger'
const log = Logger('my-app:something:something-else')
log('this is a log')
log.error('this is an error')
log.trace('this is a trace')
$ DEBUG=my-app:* node dist/test
  my-app:test:something this is a log +0ms
  my-app:test:something:error this is an error +0ms
  my-app:test:something:trace this is a trace +0ms
$ DEBUG=my-app:test:something node dist/test
  my-app:test:something this is a log +0ms
  my-app:test:something this is an error +1ms
$ DEBUG=my-app:test:* node dist/test
  my-app:test:something this is a log +0ms
  my-app:test:something:error this is an error +0ms
  my-app:test:something:trace this is a trace +0ms
$ DEBUG=my-app:error node dist/test
  my-app:error this is an error +0ms
$ DEBUG=my-app:trace node dist/test
  my-app:trace this is a log +0ms
  my-app:trace this is an error +0ms
  my-app:trace this is a trace +3ms
$ DEBUG=my-app:test:something:trace node dist/test
  my-app:test:something:trace this is a log +0ms
  my-app:test:something:trace this is an error +1ms
  my-app:test:something:trace this is a trace +0ms
$ DEBUG=my-app:test:*,-*:trace node dist/test
  my-app:test:something this is a log +0ms
  my-app:test:something:error this is an error +0ms

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%