# string-logger

> A specially built console logger for string extending Sapphire's Logger.

Latest version **1.1.1** (published 2023-08-26) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2023-08-26 |
| First published | 2023-08-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 15 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ararou |
| Maintainers | ararou |

## Links

- npm: https://www.npmjs.com/package/string-logger
- Repository: https://github.com/ararouv2/string-logger
- Homepage: https://github.com/ararouv2/string-logger#readme
- Issues: https://github.com/ararouv2/string-logger/issues
- npm.io page: https://npm.io/package/string-logger

## Dependencies (15)

- [tslib](https://npm.io/package/tslib.md) ^2.4.1
- [eslint](https://npm.io/package/eslint.md) ^8.47.0
- [prettier](https://npm.io/package/prettier.md) ^3.0.0
- [@swc/core](https://npm.io/package/@swc/core.md) ^1.3.74
- [colorette](https://npm.io/package/colorette.md) ^2.0.20
- [discord.js](https://npm.io/package/discord.js.md) 14.11.0
- [typescript](https://npm.io/package/typescript.md) ^5.0.0
- [string-logger](https://npm.io/package/string-logger.md) ^1.0.0
- [gen-esm-wrapper](https://npm.io/package/gen-esm-wrapper.md) ^1.1.3
- [@sapphire/framework](https://npm.io/package/@sapphire/framework.md) 4.5.0
- [@sapphire/ts-config](https://npm.io/package/@sapphire/ts-config.md) ^4.0.0
- [eslint-plugin-prettier](https://npm.io/package/eslint-plugin-prettier.md) ^5.0.0
- [@sapphire/eslint-config](https://npm.io/package/@sapphire/eslint-config.md) ^5.0.1
- [@sapphire/plugin-logger](https://npm.io/package/@sapphire/plugin-logger.md) ^3.0.0
- [esbuild-plugin-file-path-extensions](https://npm.io/package/esbuild-plugin-file-path-extensions.md) ^1.0.0

## Recent versions

- 1.1.1 (latest) — 2023-08-26
- 1.1.0 — 2023-08-11
- 1.0.9 — 2023-08-11
- 1.0.8 — 2023-08-11
- 1.0.7 — 2023-08-06
- 1.0.6 — 2023-08-06
- 1.0.5 — 2023-08-06
- 1.0.4 — 2023-08-06
- 1.0.3 — 2023-08-06
- 1.0.2 — 2023-08-06
- 1.0.1 — 2023-08-06
- 1.0.0 — 2023-08-06

## README

# string-logger

Specially built console logger for my projects extending Sapphire's logger.

- How to use:

ESM:

```typescript
import { StringLogger } from 'string-logger';

const logger = new StringLogger(20, 'string');
```

CJS:

```js
const { StringLogger } = require('string-logger');

const logger = new StringLogger(20, 'string');
```

- To use this logger with sapphire, add `instance: new StringLogger(<level>, <name>)` to your logger options.

- Demo of logging with sapphire framework:

```typescript
import { ApplyOptions } from '@sapphire/decorators';
import { Command } from '@sapphire/framework';

@ApplyOptions<Command.Options>({
  name: 'test',
  description: 'test!'
})
export class TestCommand extends Command {
  public registerApplicationCommands(registry: Command.Registry) {
    registry.registerChatInputCommand({
      name: this.name,
      description: this.description
    });
  }

  public async chatInputRun(interaction: Command.ChatInputCommandInteraction) {
    return this.container.logger.info('Test!');
  }
}
```

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