# @everymundo/simple-logr

> A very simplistic logger that allows one to avoid using the console.log directly allowing stubbing and better linting.

Latest version **3.4.0** (published 2025-11-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @everymundo/simple-logr
pnpm add @everymundo/simple-logr
yarn add @everymundo/simple-logr
bun add @everymundo/simple-logr
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 3.4.0 |
| Published | 2025-11-24 |
| First published | 2018-01-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 13.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Daniel Santana |
| Maintainers | yartiles, jonmorazav, ceciliagalarza, carla-villegas, everymundo-admin, ballester, danielsan, halain, mjremedios1985, eblez, avivero93, anahiem, herlin, karinfdez, erlin, front10devs, hdelcastillo, dcuevacem, ortega.dc98, pedroleon917, kaylingw, lazjramos, daniuska-em, estebanpablo89, alex-orga, double2-us, raydel, ramses83, a11y_automation2, mtmorell88, lindolo25, jsalvadorpp, volodymyrpetrov, atamayo04, danieltyd, guzman.xp, gtallesb, gguevara01 |
| Keywords | nodejs, logger |

## Links

- npm: https://www.npmjs.com/package/@everymundo/simple-logr
- Repository: https://github.com/EveryMundo/simple-logr
- Homepage: https://github.com/EveryMundo/simple-logr#readme
- Issues: https://github.com/EveryMundo/simple-logr/issues
- npm.io page: https://npm.io/package/@everymundo/simple-logr

## Dependencies (2)

- [pino](https://npm.io/package/pino.md) ^9.14.0
- [flatstr](https://npm.io/package/flatstr.md) ^1.0.12

## 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

- 3.4.0 (latest) — 2025-11-24
- 3.3.0 — 2024-10-04
- 3.2.0 — 2023-10-11
- 2.3.3 — 2023-09-18
- 3.1.2 — 2023-09-18
- 3.1.1 — 2023-09-14
- 2.3.2 — 2023-09-14
- 2.3.1 — 2023-05-08
- 3.1.0 — 2023-05-08
- 3.0.3 — 2023-03-14
- 3.0.2 — 2022-09-22
- 3.0.1 — 2022-09-16
- 3.0.0 — 2022-09-16
- 2.2.4 — 2020-03-24
- 2.2.3 — 2020-03-20
- … 18 more at https://npm.io/package/@everymundo/simple-logr/versions

## README

# @everymundo/simple-logr
Simple Logr is a wrap around [pino](https://github.com/pinojs/pino) with a default configuration and some specific extra functionality.

## Why do we need a wrapper around pino?
We created this library to help us standardize the pino settings across our applications so we achieve a consistent logging experience across them.

Another reason was that since most of these mentioned applications are running as AWS Lambda functions sending their logs to Amazon CloudWatch, we were able to make all the logs more concise and printing out a few less bytes per message, which saved us quite some money since Amazon CloudWatch Logs charges us by bytes intake.

## Installation

```bash
npm install @everymundo/simple-logr
```

## Usage

### LOG_LEVEL
The environmental variable **LOG_LEVEL** can be used to set the log level for the logger. **LOG_LEVEL** default value is _info_. That means all your calls to logr.trace and logr.debug are not going to print anything out.

Assuming you run the (simple-usage.js)[ls examples/simple-usage/simple-usage.js] script with the environmental variable LOG_LEVEL=trace, you can see the expected result.

```js
const logr = require('@everymundo/simple-logr')

logr.trace('trace message') // {"level":"trace","time":1590951886897,"msg":"trace message"}
logr.debug('debug message') // {"level":"debug","time":1590951886897,"msg":"debug message"}
logr.info('info message')   // {"level":"info","time":1590951886897,"msg":"info message"}
logr.warn('warn message')   // {"level":"warn","time":1590951886897,"msg":"warn message"}
logr.error('error message') // {"level":"error","time":1590951886897,"msg":"error message"}
logr.fatal('fatal message') // {"level":"fatal","time":1590951886897,"msg":"fatal message"}
```
### LOG_SHORT
The environmental variable **LOG_SHORT** when exists will set the logr to print what we call the short version.

Assuming you run the (simple-usage.js)[ls examples/simple-usage/simple-usage.js] script with the environmental variable LOG_LEVEL=trace, you can see the expected result.

```js
const logr = require('@everymundo/simple-logr')

logr.trace('trace message') // {"level":"trace","time":1590951886897,"msg":"trace message"}
logr.debug('debug message') // {"level":"debug","time":1590951886897,"msg":"debug message"}
logr.info('info message')   // {"level":"info","time":1590951886897,"msg":"info message"}
logr.warn('warn message')   // {"level":"warn","time":1590951886897,"msg":"warn message"}
logr.error('error message') // {"level":"error","time":1590951886897,"msg":"error message"}
logr.fatal('fatal message') // {"level":"fatal","time":1590951886897,"msg":"fatal message"}
```

If you clone this repo you can run the above examples with the help of npm scripts. Here are the steps:

```sh
git clone https://github.com/EveryMundo/simple-logr.git
cd simple-logr/examples/simple-usage
npm install

npm run trace
npm run debug
npm run info
npm run warn
npm run error
npm run fatal
```

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