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

0.1.4 • Public • Published

Airgram debug

Extends base Airgram logger.

Installation

npm install airgram-debug

Basic usage with TypeScript:

import { ag, TYPES } from 'airgram'
import { getCalleeName } from 'airgram/helpers'
import DebugLogger from 'airgram-debug'
 
airgram.bind<ag.Logger & { level: string }>(TYPES.Logger).to(DebugLogger)
  .onActivation((context, logger) => {
    logger.namespace = [getCalleeName(context)]
    logger.level = 'verbose'
    return logger
  })

Basic usage with JavaScript:

const {Airgram, AuthDialog, TYPES} = require('airgram')
const {getCalleeName} = require('airgram/helpers')
const DebugLogger = require('airgram-debug')
 
airgram.bind(TYPES.Logger).to(DebugLogger).onActivation((context, logger) => {
  logger.namespace = [getCalleeName(context)]
  logger.level = 'verbose'
  return logger
})

Readme

Keywords

Package Sidebar

Install

npm i airgram-debug

Homepage

airgram.io

Weekly Downloads

5

Version

0.1.4

License

GPL-3.0

Unpacked Size

50.5 kB

Total Files

18

Last publish

Collaborators

  • esindger