# @steffthestunt/hellog

> Another logger for JS. This one offers a console.log-like API, with plugin-based extensibility, all that with 0 dependencies.

Latest version **3.6.0** (published 2026-06-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install @steffthestunt/hellog
pnpm add @steffthestunt/hellog
yarn add @steffthestunt/hellog
bun add @steffthestunt/hellog
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.6.0 |
| Published | 2026-06-27 |
| First published | 2021-12-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 42.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 4 |
| Author | Maxence Lecanu |
| Maintainers | steffthestunt |
| Keywords | log, logger, logs |

## Links

- npm: https://www.npmjs.com/package/@steffthestunt/hellog
- Repository: https://github.com/LMaxence/hellog
- Issues: https://github.com/LMaxence/hellog/issues
- npm.io page: https://npm.io/package/@steffthestunt/hellog

## 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
- [@luma.gl/experimental](https://npm.io/package/@luma.gl/experimental.md) — 77.1K 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

## Recent versions

- 3.6.0 (latest) — 2026-06-27
- 3.5.0 — 2026-06-25
- 3.4.1 — 2025-01-09
- 3.4.0 — 2025-01-09
- 3.3.0 — 2025-01-09
- 3.2.0 — 2025-01-09
- 3.1.0 — 2024-12-21
- 3.0.0 — 2024-12-21
- 2.3.1 — 2024-09-07
- 2.3.0 — 2024-09-07
- 2.2.0 — 2023-10-28
- 2.1.0 — 2023-10-16
- 2.0.3 — 2023-04-14
- 2.0.1 — 2023-04-14
- 2.0.0 — 2023-04-14
- … 15 more at https://npm.io/package/@steffthestunt/hellog/versions

## README

# Hellog

_Your new logger!_

`hellog` is a general-purpose logging library.

It offers a `console.log`-like API and formatting, plugin-based extensibility, all that with 0 dependencies.

## Installation

```sh
npm install @steffthestunt/hellog
```

## Usage

Import `hellog` into your project and start logging:

```javascript
import { Hellog } from '@steffthestunt/hellog';

// Initialize with default config
const logger = new Hellog();

logger.debug('Hello, world!');
// Outputs : 2024-12-21T13:48:08.064Z [INFO] Hello, world!

logger.info('This is an info message.');
// Outputs : 2024-12-21T13:48:08.064Z [INFO] This is an info message.

logger.warn('This is a warning message.');
// Outputs : 2024-12-21T13:48:08.064Z [WARN] This is a warning message.

logger.error('This is an error message.');
// Outputs : 2024-12-21T13:48:08.064Z [ERROR] This is an error message.

logger.info('Logging a number:', 123);
// Outputs : 2024-12-21T13:48:08.064Z [INFO] Logging a number: 123

logger.info('Logging an object:', { key: 'value' });
// Outputs : 2024-12-21T13:48:08.064Z [INFO] Logging an object: { key: 'value' }

logger.info('Logging an array:', [1, 2, 3]);
// Outputs : 2024-12-21T13:48:08.064Z [INFO] Logging an array: [ 1, 2, 3 ]
```

## Features

- **Console-like API**: Use `debug`, `info`, `warn`, and `error` methods.
- **Plugin-based extensibility**: Extend functionality with plugins.
- **Zero dependencies**: Lightweight and easy to integrate.

## Plugins

Hellog's plugin system allows you to extend its functionality. Plugins can modify log messages and control how they are output.

### Default Plugins

Hellog comes with these plugins enabled by default:

- `HellogLineBreakDefaultPlugin` - A plugin to split `console.log` messages that would span over multiple lines and format each line separately.
- `HellogPrettyDefaultPlugin` - A plugin to format log messages in a more readable way: `{timestamp} [{level}] {message}`.
- `HellogStdoutDefaultPlugin` - A plugin to output log messages to stdout or stderr depending on the level.

### Creating a Plugin

Plugins are created by extending the `HellogPlugin` base class:

```javascript
import { HellogPlugin } from '@steffthestunt/hellog';

class TimestampPlugin extends HellogPlugin {
  transform(message, level) {
    const timestamp = new Date().toISOString();
    return `[${timestamp}] ${message}`;
  }
}

// Initialize logger with custom plugins
const logger = new Hellog({
  plugins: [new TimestampPlugin()],
});
```

### Plugin Examples

Common plugin configurations:

```javascript
import {
  HellogLineBreakPlugin,
  HellogPrettyPlugin,
  HellogStdoutPlugin,
} from '@steffthestunt/hellog';

// Initialize with multiple plugins
const logger = new Hellog({
  plugins: [
    // Default plugins
    new HellogLineBreakPlugin(),
    new HellogPrettyPlugin(),
    new HellogStdoutPlugin(),

    // Custom plugins
    new TimestampPlugin(),
  ],
});
```

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