New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

aurelia-logging-color

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aurelia-logging-color

ColorAppender for `aurelia-logging`

1.0.5
latest
Version published
Weekly downloads
196
-12.89%
Maintainers
1
Weekly downloads
 
Created

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

FAQs

Package last updated on 13 May 2019

Did you know?

Socket

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