# kw-logger

> Simplify logging with the power of the factory design pattern

Latest version **1.0.1** (published 2024-02-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install kw-logger
pnpm add kw-logger
yarn add kw-logger
bun add kw-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.0.1 |
| Published | 2024-02-25 |
| First published | 2024-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 21.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | law12th |

## Links

- npm: https://www.npmjs.com/package/kw-logger
- npm.io page: https://npm.io/package/kw-logger

## Dependencies (7)

- [axios](https://npm.io/package/axios.md) ^1.6.2
- [morgan](https://npm.io/package/morgan.md) ^1.10.0
- [express](https://npm.io/package/express.md) ^4.18.2
- [ts-node](https://npm.io/package/ts-node.md) ^10.9.1
- [winston](https://npm.io/package/winston.md) ^3.11.0
- [winston-daily-rotate-file](https://npm.io/package/winston-daily-rotate-file.md) ^4.7.1
- [winston-slack-webhook-transport](https://npm.io/package/winston-slack-webhook-transport.md) ^2.3.3

## Recent versions

- 1.0.1 (latest) — 2024-02-25

## README

# Custom Logger

Simplify logging with the power of the factory design pattern

**Overview:**

The Custom Logger is a logging application designed to serve as a comprehensive guide on implementing the factory design within your software projects. It leverages on the [winston](https://github.com/winstonjs/winston) logging library capable of seamlessly directing logs to various destinations, including the terminal, files, or even messaging platforms such as Slack.

**Key Features:**

- **Factory Design Pattern:** Learn how to apply the factory pattern to dynamically create different types of transports, providing flexibility and scalability to adapt to your specific logging requirements.
- **Winston Integration:** Harness the capabilities of the winston logging library, ensuring robust and efficient log management.

## Getting Started

These instructions will help you get the project up and running on your local machine.

### Prerequisites

Before you begin, ensure you have met the following requirements:

- Git: [Installation Guide](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- Node JS runtime: [Installation](https://nodejs.org/en/)
- Yarn package manager: [Installation](https://classic.yarnpkg.com/lang/en/docs/install/#windows-stable)

### Step 1: Clone project

1. In your terminal run the following command to clone the project:

```
git clone https://github.com/law12th/logger.git

cd logger
```

2. Install project dependencies using yarn:

```
yarn install
```

3. Rename `.env.example` to `.env`

```
mv .env.example .env
```

4. Edit the `.env` file and add your slack webhook url and node environment

### Step 2: Run project

1. Run the following command to run the project:

```
yarn start
```

**Learn More:**

For an in-depth understanding of the concepts and insights behind this project, check out the accompanying Medium article [here](https://www.medium.com)

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