@apollo/utils.logger
Generic logger interface
Last updated 3 years ago by apollo-bot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @apollo/utils.logger 
SYNC missed versions from official npm registry.

Logger interface

interface Logger {
  debug(message?: any): void;
  info(message?: any): void;
  warn(message?: any): void;
  error(message?: any): void;
}

This generic interface for loggers supports logging a string at one of four different levels (debug, info, warn, error). It's designed to be compatible with Node's console as well as commonly used logging packages and is tested against a few of them. Below are the logging libraries we test for compatibility against.

bunyan

const logger = bunyan.createLogger();

log4js

const logger = log4js.getLogger();

loglevel

const logger = loglevel.getLogger();

winston

const logger = winston.createLogger();

Current Tags

  • 2.0.0                                ...           latest (3 years ago)

3 Versions

  • 2.0.0                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None

Copyright 2013 - present © cnpmjs.org | Home |