# ocbesbn-logger

> Unified logging component for OpusCapita Business Network.

Latest version **1.0.11** (published 2018-10-26) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2018-10-26 |
| First published | 2017-04-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 14.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Christian Drengenberg |
| Maintainers | gr4per, kwierchris, nczeranka |
| Keywords | Logging, Logger |

## Links

- npm: https://www.npmjs.com/package/ocbesbn-logger
- Repository: https://github.com/OpusCapita/logger
- Homepage: https://github.com/OpusCapita/logger#readme
- Issues: https://github.com/OpusCapita/logger/issues
- npm.io page: https://npm.io/package/ocbesbn-logger

## Dependencies (1)

- [extend](https://npm.io/package/extend.md) ^3.0.2

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.0.11 (latest) — 2018-10-26
- 1.0.10 — 2018-10-26
- 1.0.9 — 2018-06-25
- 1.0.8 — 2018-06-18
- 1.0.7 — 2018-06-18
- 1.0.6 — 2018-06-14
- 1.0.5 — 2017-08-01
- 1.0.4 — 2017-07-31
- 1.0.3 — 2017-07-24
- 1.0.2 — 2017-06-07
- 1.0.1 — 2017-05-15
- 1.0.0 — 2017-04-05

## README

# ocbesbn-logger
[![Coverage Status](https://coveralls.io/repos/github/OpusCapita/logger/badge.svg?branch=master)](https://coveralls.io/github/OpusCapita/logger?branch=master)

This module provides simple common logging. For further details of how to use this module, please have a look at the [wiki](https://github.com/OpusCapita/logger/wiki).

---

### Minimum setup

First got to your local code directory and run:

```
npm install ocbesbn-logger
```

After that you can directly use the logger component.

```JS
const Logger = require('ocbesbn-logger');

var logger = new Logger({});
logger.info('Hello, %s', 'world!');
```

By default you will get info and warning messages on stdout and error and exception messages on stderr.

---

### DummyLogger

In order to be able to work with a full instantiated Logger by simultaneously not logging anything (suppressing any output), you may want to use the DummyLogger provided by this module.

```JS
const Logger = require('ocbesbn-logger');

var logger = Logger.DummyLogger;
logger.info('Hello, %s', 'world!'); // Outputs nothing.
```

---

### Default configuration

The default configuration object provides hints about what the module's standard behavior is like and which configuration options are available. For further details about the API, please have a look at the [wiki](https://github.com/OpusCapita/logger/wiki).

```JS
{
    defaultLogLevel : Logger.LogLevel.Info,
    minLogLevel : Logger.LogLevel.Info,
    outputStreams : {
        [Logger.LogLevel.Debug] : process.stdout,
        [Logger.LogLevel.Info] : process.stdout,
        [Logger.LogLevel.Warning] : process.stdout,
        [Logger.LogLevel.Error] : process.stderr,
        [Logger.LogLevel.Exception] : process.stderr
    },
    context : {
        serviceName : Logger.serviceName,
        serviceInstanceId : 0,
        correlationId : null,
        userId : null,
        requestUri : null
    }
}
```

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