heimdalljs-logger

WebJar for heimdalljs-logger

License

License

MIT
Categories

Categories

JavaScript Languages
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

heimdalljs-logger
Last Version

Last Version

0.1.10
Release Date

Release Date

Type

Type

jar
Description

Description

heimdalljs-logger
WebJar for heimdalljs-logger
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/heimdalljs/heimdalljs-logger

Download heimdalljs-logger

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/heimdalljs-logger/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>heimdalljs-logger</artifactId>
    <version>0.1.10</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/heimdalljs-logger/
implementation 'org.webjars.npm:heimdalljs-logger:0.1.10'
// https://jarcasting.com/artifacts/org.webjars.npm/heimdalljs-logger/
implementation ("org.webjars.npm:heimdalljs-logger:0.1.10")
'org.webjars.npm:heimdalljs-logger:jar:0.1.10'
<dependency org="org.webjars.npm" name="heimdalljs-logger" rev="0.1.10">
  <artifact name="heimdalljs-logger" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='heimdalljs-logger', version='0.1.10')
)
libraryDependencies += "org.webjars.npm" % "heimdalljs-logger" % "0.1.10"
[org.webjars.npm/heimdalljs-logger "0.1.10"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : debug jar [2.2.0,3)
org.webjars.npm : heimdalljs jar [0.2.6,0.3)

Project Modules

There are no modules declared in this project.

Usage

With no Heimdall Tree

var logger = require('heimdalljs-logger')('foo');

logger.trace('trace message');
logger.debug('debug message');
logger.info('info message');
logger.warn('warn message');
logger.error('error message');

console.log('app message');
DEBUG=foo DEBUG_LEVEL=trace foo
# =>  trace message
# ... debug message
# ... info message
# ... warn message
# ... error message
# ... app message

foo
# =>  app message

DEBUG=foo DEBUG_LEVEL=warn foo
# =>  warn message
# ... error message
# ... app message

With a Heimdall Tree

var heimdall = require('heimdalljs');
var config  = require('heimdalljs').configFor('logging');

config.matcher = (id) => /hai/.test(id.name);
config.depth = 2;

var logger = require('heimdalljs-logger')('foo');

heimdall.start('a');
heimdall.start('bhai');
heimdall.start('c');
heimdall.start('dhai');

logger.warn('warn message');
// => foo [bhai -> dhai] warn message
org.webjars.npm

Versions

Version
0.1.10
0.1.9