Socket
Socket
Sign inDemoInstall

aurelia-logging-color

Package Overview
Dependencies
3
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    aurelia-logging-color

ColorAppender for `aurelia-logging`


Version published
Maintainers
1
Install size
240 kB
Created

Readme

Source

aurelia-logging-color

NPM version NPM downloads Build status Coverage Status badge-size-url

ColorAppender for aurelia-logging and @unional/logging.

Why color

Logging is a great tool. But it is also heavily underutilized. One major reason is that when we log a lot of stuff, we can quickly get overwhelmed by all those information.

aurelia-logging allows you to create different loggers for different part of your application, as fine grain as you wanted.

However, it still does not solve the issue above.

Coloring the log message helps you to pick the relevant information much easier.

Usage

import { addAppender, setLevel, getLogger, logLevel } from 'aurelia-logging' // or '@unional/logging'
import { ColorAppender } from 'aurelia-logging-color'

addAppender(new ColorAppender())

// turn on logging (this example do it globally)
setLevel(logLevel.info)

const loggerA = getLogger('Logger A')

loggerA.warn('Pretty Color')

const loggerB = getLogger('Logger B')

loggerB.info('Nother pretty color!')

Gives you:

image

Note that on windows 8 or below the constructor option is not in effect because there are not many color available.

dependencies

  • color-map

FAQs

Last updated on 13 May 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc