@bearer/logger
Bearer logger
Last updated 2 months ago by antoine.apizi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @bearer/logger 
SYNC missed versions from official npm registry.

@bearer/logger

Version npm bundle size (scoped) Downloads/week License

Usage

We recommend to create a logger file within you project

// my-logger.ts
import debug from '@bearer/logger'

export default () => debug('my-package-name')

then in your app

import debug from 'path/to/my-logger'

const logger = debug()
logger('message to debug')
logger({ object: 'something' })

// sub logger

const subLogger = logger.extend('sub-feature')
subLogger('blablabl')

You'll need to set DEBUG=* to see all logs or DEBUG=bearer:my-package-name to see logs produced by your application.

Browser support

We assume you are writing a bearer integration.

views/src/my-component.tsx

import debug from '@bearer/logger'

const logger = debug('a-scope-you-provide')

class MyComponent {
  componentDidLoad() {
    logger('Loaded')
  }
}

if you want to see logs you must enable it by setting the localStorage.debug value from your console

Show all logs

localStorage.debug = '*'

Show bearer logs only

localStorage.debug = 'bearer:*'

Show your integration logs only

localStorage.debug = 'bearer:a-scope-you-provide:*'

Current Tags

  • 0.96.1                                ...           beta5 (10 months ago)
  • 0.105.0                                ...           beta6 (9 months ago)
  • 0.113.0                                ...           buid (8 months ago)
  • 1.7.1-canary.2                                ...           canary (5 months ago)
  • 1.13.9                                ...           latest (2 months ago)
  • 1.6.1                                ...           next (5 months ago)
  • 0.115.1                                ...           rc (8 months ago)

126 Versions

  • 1.13.9                                ...           2 months ago
  • 1.13.8                                ...           2 months ago
  • 1.13.4                                ...           3 months ago
  • 1.7.1-canary.2                                ...           5 months ago
  • 1.8.0-canary.2                                ...           5 months ago
  • 1.7.0                                ...           5 months ago
  • 1.6.8                                ...           5 months ago
  • 1.6.2-canary-4.1                                ...           5 months ago
  • 1.6.1                                ...           5 months ago
  • 1.4.2-canary.17 [deprecated]           ...           5 months ago
  • 1.0.2                                ...           8 months ago
  • 1.0.1                                ...           8 months ago
  • 1.0.0                                ...           8 months ago
  • 0.115.1 [deprecated]           ...           8 months ago
  • 0.115.0 [deprecated]           ...           8 months ago
  • 0.114.1 [deprecated]           ...           8 months ago
  • 0.113.0 [deprecated]           ...           8 months ago
  • 0.112.0 [deprecated]           ...           8 months ago
  • 0.111.0-canary2.13 [deprecated]           ...           8 months ago
  • 0.111.0-canary.13 [deprecated]           ...           8 months ago
  • 0.111.0-canary.9 [deprecated]           ...           8 months ago
  • 0.111.0 [deprecated]           ...           8 months ago
  • 0.111.0-canary.2 [deprecated]           ...           8 months ago
  • 0.110.0 [deprecated]           ...           8 months ago
  • 0.109.0 [deprecated]           ...           8 months ago
  • 0.108.0 [deprecated]           ...           8 months ago
  • 0.108.0-canary-x-ray.10 [deprecated]           ...           8 months ago
  • 0.108.0-canary-xray.16 [deprecated]           ...           8 months ago
  • 0.107.0-canary-xray.8 [deprecated]           ...           8 months ago
  • 0.107.0-canary-tarik.8 [deprecated]           ...           8 months ago
  • 0.107.0-canary-tarik.7 [deprecated]           ...           8 months ago
  • 0.107.0 [deprecated]           ...           8 months ago
  • 0.107.0-canary-tarik.6 [deprecated]           ...           8 months ago
  • 0.107.0-canary-tarik.5 [deprecated]           ...           8 months ago
  • 0.107.0-canary-tarik.3 [deprecated]           ...           8 months ago
  • 0.107.0-canary-tarik.2 [deprecated]           ...           8 months ago
  • 0.107.0-canary-tarik.1 [deprecated]           ...           8 months ago
  • 0.107.0-canary.1 [deprecated]           ...           8 months ago
  • 0.107.0-canary.0 [deprecated]           ...           8 months ago
  • 0.100.1-canary.102 [deprecated]           ...           8 months ago
  • 0.107.0-canary.6 [deprecated]           ...           8 months ago
  • 0.106.0 [deprecated]           ...           8 months ago
  • 0.106.0-canary.15 [deprecated]           ...           8 months ago
  • 0.106.0-canary.14 [deprecated]           ...           8 months ago
  • 0.106.0-canary.13 [deprecated]           ...           8 months ago
  • 0.106.0-canary.9 [deprecated]           ...           8 months ago
  • 0.106.0-canary.5 [deprecated]           ...           9 months ago
  • 0.106.0-canary.1 [deprecated]           ...           9 months ago
  • 0.105.0 [deprecated]           ...           9 months ago
  • 0.104.0 [deprecated]           ...           9 months ago
  • 0.103.0 [deprecated]           ...           9 months ago
  • 0.102.0 [deprecated]           ...           9 months ago
  • 0.100.1-canary.53 [deprecated]           ...           9 months ago
  • 0.100.1-canary.51 [deprecated]           ...           9 months ago
  • 0.101.0 [deprecated]           ...           9 months ago
  • 0.101.0-canary.43 [deprecated]           ...           9 months ago
  • 0.100.1-canary.40 [deprecated]           ...           9 months ago
  • 0.100.1-canary.39 [deprecated]           ...           9 months ago
  • 0.100.1-canary.34 [deprecated]           ...           9 months ago
  • 0.100.1-next.40                                ...           9 months ago
  • 0.100.1-canary.36 [deprecated]           ...           9 months ago
  • 0.100.1-next.35                                ...           9 months ago
  • 0.92.1-canary.148 [deprecated]           ...           9 months ago
  • 0.100.1-canary.31 [deprecated]           ...           9 months ago
  • 0.100.1-next.48                                ...           9 months ago
  • 0.100.1-next.47                                ...           9 months ago
  • 0.92.1-canary.143 [deprecated]           ...           9 months ago
  • 0.92.1-canary.142 [deprecated]           ...           9 months ago
  • 0.100.1-canary.25 [deprecated]           ...           9 months ago
  • 0.92.1-canary.138 [deprecated]           ...           9 months ago
  • 0.92.1-canary.137 [deprecated]           ...           9 months ago
  • 0.100.1-next.27                                ...           9 months ago
  • 0.92.1-canary.136 [deprecated]           ...           9 months ago
  • 0.92.1-canary.135 [deprecated]           ...           9 months ago
  • 0.100.1-next.25                                ...           9 months ago
  • 0.92.1-canary.134 [deprecated]           ...           9 months ago
  • 0.92.1-canary.133 [deprecated]           ...           9 months ago
  • 0.100.1-next.21                                ...           9 months ago
  • 0.92.1-canary.132 [deprecated]           ...           9 months ago
  • 0.100.1-next.23                                ...           9 months ago
  • 0.92.1-canary.114 [deprecated]           ...           9 months ago
  • 0.100.1-next.17                                ...           9 months ago
  • 0.100.1-next.15                                ...           9 months ago
  • 0.100.1-next.1                                ...           9 months ago
  • 0.100.0 [deprecated]           ...           9 months ago
  • 0.99.2 [deprecated]           ...           9 months ago
  • 0.99.0 [deprecated]           ...           9 months ago
  • 0.98.0 [deprecated]           ...           9 months ago
  • 0.97.3 [deprecated]           ...           9 months ago
  • 0.97.2 [deprecated]           ...           9 months ago
  • 0.97.0 [deprecated]           ...           9 months ago
  • 0.96.2-next.13                                ...           9 months ago
  • 0.96.1 [deprecated]           ...           10 months ago
  • 0.96.0 [deprecated]           ...           10 months ago
  • 0.95.1 [deprecated]           ...           10 months ago
  • 0.95.0 [deprecated]           ...           10 months ago
  • 0.94.1 [deprecated]           ...           10 months ago
  • 0.94.0 [deprecated]           ...           10 months ago
  • 0.93.0 [deprecated]           ...           10 months ago
  • 0.92.2 [deprecated]           ...           10 months ago
  • 0.92.1 [deprecated]           ...           10 months ago
  • 0.92.0 [deprecated]           ...           10 months ago
  • 0.91.5 [deprecated]           ...           10 months ago
  • 0.91.0 [deprecated]           ...           a year ago
  • 0.90.2 [deprecated]           ...           a year ago
  • 0.90.1 [deprecated]           ...           a year ago
  • 0.90.0 [deprecated]           ...           a year ago
  • 0.89.0 [deprecated]           ...           a year ago
  • 0.88.0 [deprecated]           ...           a year ago
  • 0.87.0 [deprecated]           ...           a year ago
  • 0.86.2 [deprecated]           ...           a year ago
  • 0.86.0 [deprecated]           ...           a year ago
  • 0.85.0 [deprecated]           ...           a year ago
  • 0.84.2 [deprecated]           ...           a year ago
  • 0.84.1 [deprecated]           ...           a year ago
  • 0.84.0 [deprecated]           ...           a year ago
  • 0.83.4 [deprecated]           ...           a year ago
  • 0.83.3 [deprecated]           ...           a year ago
  • 0.83.0 [deprecated]           ...           a year ago
  • 0.82.0 [deprecated]           ...           a year ago
  • 0.81.8 [deprecated]           ...           a year ago
  • 0.81.7 [deprecated]           ...           a year ago
  • 0.81.4 [deprecated]           ...           a year ago
  • 0.81.2 [deprecated]           ...           a year ago
  • 0.81.1 [deprecated]           ...           a year ago
  • 0.81.0 [deprecated]           ...           a year ago

Copyright 2014 - 2016 © taobao.org |