typelogger
A simply typed logger for typescript
Last updated 3 years ago by jglanz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install typelogger 
SYNC missed versions from official npm registry.

typelogger

Overview

Super simply log wrapper for any framework or the console. Strongly typed with thresholds

Install

Pretty simple

npm i --save typelogger

Use

It couldn't be much easier

import * as Log from "typelogger"

const logger = Log.create(__filename)
logger.info('What up!!!')

// To override the output functions
Log.setLoggerOutput(console)

// To swap out the create factory entirely
Log.setLoggerFactory({
	create(name:string) {

		// This is a crap example - checkout the ILogger def
		// for the right way
		console.log(`Creating custom logger with custom factory for: ${name}`)
		return console as Log.ILogger
	}
})

// Or just add a cute styler
// Log.setStyler(Log.ILogStyler) - we use a simple chalk styler by default

Current Tags

  • 1.0.29                                ...           latest (3 years ago)

14 Versions

  • 1.0.29                                ...           3 years ago
  • 1.0.28                                ...           4 years ago
  • 1.0.27                                ...           4 years ago
  • 1.0.25                                ...           4 years ago
  • 1.0.24                                ...           4 years ago
  • 1.0.23                                ...           4 years ago
  • 1.0.22                                ...           4 years ago
  • 1.0.21                                ...           4 years ago
  • 1.0.20                                ...           4 years ago
  • 1.0.19                                ...           4 years ago
  • 1.0.4                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (12)

Copyright 2014 - 2016 © taobao.org |