# imergo-logger

> Generic winston logger wrapper for our imergo-frameworks.

Latest version **9.0.2** (published 2025-07-19) · Apache-2.0 license · 0 weekly downloads

## Install

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

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 9.0.2 |
| Published | 2025-07-19 |
| First published | 2016-12-21 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM |
| Node | >=24 |
| Dependencies | 4 |
| Unpacked size | 21 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Digital Health Department, Fraunhofer Institute for Applied Information Technology FIT |
| Maintainers | webcc |

## Links

- npm: https://www.npmjs.com/package/imergo-logger
- Repository: https://gitlab.cc-asp.fraunhofer.de/health-open/imergo-logger
- npm.io page: https://npm.io/package/imergo-logger

## Dependencies (4)

- [winston](https://npm.io/package/winston.md) 3.17.0
- [micromatch](https://npm.io/package/micromatch.md) 4.0.8
- [@types/node](https://npm.io/package/@types/node.md) 24.0.15
- [@types/micromatch](https://npm.io/package/@types/micromatch.md) 4.0.9

## Recent versions

- 9.0.2 (latest) — 2025-07-19
- 9.0.1 — 2025-07-19
- 9.0.0 — 2025-07-19
- 8.6.0 — 2024-06-20
- 8.5.0 — 2024-04-24
- 8.4.0 — 2023-10-24
- 8.3.0 — 2023-09-22
- 8.2.0 — 2023-09-03
- 8.1.0 — 2023-08-03
- 8.0.1 — 2023-08-03
- 8.0.0 — 2023-08-02
- 7.0.0 — 2022-09-18
- 6.5.0 — 2022-07-16
- 6.4.0 — 2022-07-16
- 6.3.0 — 2022-07-16
- … 10 more at https://npm.io/package/imergo-logger/versions

## README

imergo-logger
=============

[![NPM Version][npm-image]][npm-url] ![Node][node-version]

This module is a generic [winston][winston] logger wrapper for our imergo-frameworks.
It is a globally configurable logger via environment variables, with default values.

## Install

```shell
npm install imergo-logger
```

## Usage

```javascript
import Logger from "imergo-logger"
const logger = Logger(label | config)
logger.error("This is an error message")
```

Where:
 
- `label`: standard descriptive string
- `config`: standard [winston][winston] configuration object

## Environment variables

| Variable                 | Description                                                                | Default                                                              |
|:-------------------------|:---------------------------------------------------------------------------|----------------------------------------------------------------------|
| `NODE_DEBUG`             | Comma-separated list of module names to be debugged (it accepts wildcards) | None                                                                 |
| `NODE_IMERGO_LOGCONSOLE` | When `false`, it deactivates shell logging                                 | `true`                                                               |
| `NODE_IMERGO_LOGDIR`     | Directory where to store logs                                              | `$HOME/.logs` in POSIX systems or ``%USERPROFILE%\.logs`` in Windows |
| `NODE_IMERGO_LOGFILE`    | Name of the log file                                                       | `imergo.log`                                                         |

## Testing

```shell
npm test
```

## Documentation

To install the documentation locally, run:

```shell
npm run doc
``` 

Available online at:
[https://health-open.pages.fraunhofer.de/imergo-logger/](https://health-open.pages.fraunhofer.de/imergo-logger/)

[node-version]: https://img.shields.io/badge/node-24-orange.svg?style=flat-square
[npm-image]: https://img.shields.io/badge/npm-9.0.2-blue.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/imergo-logger
[winston]: https://github.com/winstonjs/winston

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