# seal-log

> Logger for all Node.js modules by SEAL Systems

Latest version **1.2.0** (published 2017-02-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install seal-log
pnpm add seal-log
yarn add seal-log
bun add seal-log
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2017-02-17 |
| First published | 2017-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | SEAL Systems AG |
| Maintainers | michaelscherer-seal |

## Links

- npm: https://www.npmjs.com/package/seal-log
- Repository: https://github.com/sealsystems/seal-log
- Homepage: https://github.com/sealsystems/seal-log#readme
- Issues: https://github.com/sealsystems/seal-log/issues
- npm.io page: https://npm.io/package/seal-log

## Dependencies (1)

- [flaschenpost](https://npm.io/package/flaschenpost.md) 0.15.3

## Recent versions

- 1.2.0 (latest) — 2017-02-17
- 1.1.11 — 2017-02-14
- 1.1.10 — 2017-02-06

## README

# seal-log

[![CircleCI](https://circleci.com/gh/sealsystems/seal-log.svg?style=svg)](https://circleci.com/gh/sealsystems/seal-log)
[![Appveyor](https://ci.appveyor.com/api/projects/status/uwryvhs5u2a9p0o2?svg=true)](https://ci.appveyor.com/project/Plossys/seal-log-knkyy)

seal-log is the logger for all Node.js modules by SEAL Systems.

All log messages will be written to `stdout` and can then be processed by 3rd-party tools.

## Installation

```bash
$ npm install seal-log
```

## Quick start

First you need to integrate seal-log into your application.

```javascript
const log = require('seal-log').getLogger();
```

### Logging

The following log levels are defined:

- debug:

  ```javascript
  log.debug('This is a debug message.');
  ```

- info:

  ```javascript
  log.info('This is a info message.');
  ```

- warn:

  ```javascript
  log.warn('This is a warning message.');
  ```

- error:

  ```javascript
  log.error('This is a error message.');
  ```

- fatal:

  ```javascript
  log.fatal('This is a fatal error message.');
  ```

  **Please note:** This level will be used for logging an unhandled exception.

### Uncaught exceptions

Exceptions that are not caught otherwise are also logged with log level `fatal`. After logging the exception, the process will be terminated with exit code `1`. You have to require the log module at least one time in your project to enable this feature. No further configuration is required.

## Environment Variables

### LOG_LEVELS

A list of log levels to print out. Possible levels are:

- `debug`
- `info`
- `warn`
- `error`
- `fatal`

You have to provide a comma seperated list of the log levels you are interessted in:

```
LOG_LEVELS=info,warn,error,fatal
```
The list given above is the default setting, if no environment variable is set.

You can enable all logging levels with the shortcut

```
LOG_LEVELS=*
```

### LOG_LEVEL

A single minimum log level which includes all higher levels.

```
LOG_LEVEL=warn
```

The setting above includes log levels `warn`, `error` and `fatal`.

The environment variable `LOG_LEVEL` has precedence over `LOG_LEVELS`.

## Running the build

To build this module use [roboter](https://www.npmjs.com/package/roboter).

```bash
$ bot
```

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