kw-logger
v1.0.1
Published
Simplify logging with the power of the factory design pattern
Downloads
4
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 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
- Node JS runtime: Installation
- Yarn package manager: Installation
Step 1: Clone project
- In your terminal run the following command to clone the project:
git clone https://github.com/law12th/logger.git
cd logger
- Install project dependencies using yarn:
yarn install
- Rename
.env.example
to.env
mv .env.example .env
- Edit the
.env
file and add your slack webhook url and node environment
Step 2: Run project
- 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