# heimdalljs-logger

> Structured logging via heimdalljs

Latest version **0.1.10** (published 2018-08-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install heimdalljs-logger
pnpm add heimdalljs-logger
yarn add heimdalljs-logger
bun add heimdalljs-logger
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.10 |
| Published | 2018-08-17 |
| First published | 2016-08-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 252.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | David J. Hamilton |
| Maintainers | hjdivad, krisselden, lynchbomb, rwjblue, stefanpenner |
| Keywords | javascript |

## Links

- npm: https://www.npmjs.com/package/heimdalljs-logger
- Repository: https://github.com/heimdalljs/heimdalljs-logger
- Homepage: https://github.com/heimdalljs/heimdalljs-logger#README.md
- Issues: https://github.com/heimdalljs/heimdalljs-logger/issues
- npm.io page: https://npm.io/package/heimdalljs-logger

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^2.2.0
- [heimdalljs](https://npm.io/package/heimdalljs.md) ^0.2.6

## Recent versions

- 0.1.10 (latest) — 2018-08-17
- 0.1.9 — 2017-04-04
- 0.1.8 — 2017-02-07
- 0.1.7 — 2016-08-09
- 0.1.6 — 2016-08-01
- 0.1.5 — 2016-08-01
- 0.1.4 — 2016-08-01
- 0.1.3 — 2016-08-01
- 0.1.1 — 2016-08-01
- 0.1.0 — 2016-08-01

## README

## Usage

### With no Heimdall Tree

```js
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');
```

```sh
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

```js
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
```

---
_Source: https://npm.io/package/heimdalljs-logger · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
