# logger-genesis

> Logger package for genesis developers

Latest version **6.0.0** (published 2024-02-02) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.0.0 |
| Published | 2024-02-02 |
| First published | 2021-11-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 49.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | elikov, systemgenesis0 |
| Keywords | RabbitMQ, TypeScript, Logs |

## Links

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

## Dependencies (2)

- [winston](https://npm.io/package/winston.md) ^3.11.0
- [menashmq](https://npm.io/package/menashmq.md) ^0.1.6

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 6.0.0 (latest) — 2024-02-02
- 5.0.0 — 2024-02-02
- 4.0.0 — 2023-11-07
- 3.2.0 — 2023-11-02
- 3.1.0 — 2023-11-02
- 3.0.0 — 2023-11-02
- 2.2.0 — 2022-04-07
- 2.1.4 — 2022-03-06
- 2.1.3 — 2022-01-30
- 2.1.2 — 2022-01-30
- 2.1.1 — 2021-11-23
- 2.1.0 — 2021-11-23
- 2.0.2 — 2021-11-21
- 2.0.1 — 2021-11-21
- 2.0.0 — 2021-11-21
- … 9 more at https://npm.io/package/logger-genesis/versions

## README

Easy ways to use logs and send them to RabbitMQ using menashmq in your service for TypeScript

# Examples

## Initialize once

**index.ts**

    import logger from 'logger-genesis';

    logger.initialize('systemA', 'serviceA', true, {
        createMenashRabbitMQConnection: true,
        uri: 'amqp://localhost:5672',
        logQueueName: 'log-queue',
    });

## Usage

import logger from 'logger-genesis';

logger.info(title, message, JSON.stringify(extraFields));


## Methods

-   initialize()

-   info()

-   warn()

-   error()

## Params

**initialize**

-   system -> Name of the system

-   service -> Name of the service

-   logQueueName -> Name of the Log's Queue

-   createRabbitConnection -> True if need to create connection to rabbitMQ with menash

-   uri -> Connection URI of rabbitMQ (Needed only if createRabbitConnection is true)

-   retryOptions -> retryOption to connect to RabbitMQ (details in menashmq readme, needed only if createRabbitConnection is true)

**logInfo/logWarn/logError**

-   title -> Title of the log

-   message -> The message of the log

-   extraFields -> Extra fields that you want to add (Like id, runUID and etc.)

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