# logoligi

> Log stylishly in your terminal.

Latest version **2.0.3** (published 2024-06-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install logoligi
pnpm add logoligi
yarn add logoligi
bun add logoligi
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2024-06-13 |
| First published | 2023-05-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 3 |
| Unpacked size | 14.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Baah Kusi |
| Maintainers | baahkusi, jovells |
| Keywords | cli, console, color, terminal, ansi, terminal-emulators, chalk, boxen, ora |

## Links

- npm: https://www.npmjs.com/package/logoligi
- Repository: https://github.com/baahkusi/logoligi
- Homepage: https://github.com/baahkusi/logoligi#readme
- Issues: https://github.com/baahkusi/logoligi/issues
- npm.io page: https://npm.io/package/logoligi

## Dependencies (3)

- [ora](https://npm.io/package/ora.md) 5.4.1
- [boxen](https://npm.io/package/boxen.md) 5.1.2
- [chalk](https://npm.io/package/chalk.md) ^4

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 2.0.3 (latest) — 2024-06-13
- 2.0.2 — 2024-06-13
- 2.0.1 — 2024-06-13
- 2.0.0 — 2024-06-13
- 1.0.1 — 2023-05-22
- 1.0.0 — 2023-05-22

## README

# logoligi

Ties chalk, boxen & ora behind a simple logging api. Wrapps around `console.log`. This allows you to do the following;

- Log in different colors to the terminal, supported colors https://github.com/chalk/chalk/tree/main#colors.
- Have a spinner on terminal logs for async operations.
- Have boxes around your logs, supported boxes https://github.com/sindresorhus/boxen/tree/main#borderstyle.

## Install

`npm i logoligi`

## Usage

```typescript
import Logger from 'logoligi';

// start logging 
Logger.log('Hi');

// log with config
Logger.log('Hello', {
   color: 'blue', // https://github.com/chalk/chalk/tree/main#colors
   bgColor: 'white', // https://github.com/chalk/chalk/tree/main#background-colors
   box: 'double' // https://github.com/sindresorhus/boxen/tree/main#borderstyle
});

// full config interface
/*
interface LoggerConfigI {
  color?: string;
  bgColor?: string;
  box?: string;
  title?: string;
  status?: "warn" | "success" | "fail" | "info" | "end"; // only for Logger.endLog ...
}
*/

// default configs for different log levels have been set
Logger.info('H');
Logger.debug('E');
Logger.warn('LL');
Logger.error('O');

// you can pass config for each of these
Logger.info('Okay!', {
   color: 'yello'
});

// show loader whilst asyn process is running
const logger = Logger.startLog('Downloading ...');
await new Promise(r => setTimeout(r, 2000));
Logger.endLog(logger, 'Finished Downloading!');
Logger.endLog(logger, 'Finished Downloading!', { status: 'success' }); // indicate success check mark in console
// indicate failure
Logger.endLog(logger, 'failed Downloading!', { status: 'fail' }); 
// you can indicate error, info, and warning as well.
```

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