Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itachi9797/gen-logger
https://github.com/itachi9797/gen-logger
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/itachi9797/gen-logger
- Owner: itachi9797
- Created: 2024-04-10T19:31:31.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-10T19:31:36.000Z (9 months ago)
- Last Synced: 2024-04-11T19:11:56.451Z (9 months ago)
- Language: JavaScript
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gen Logger
[![npm version](https://badge.fury.io/js/gen-logger.svg)](https://badge.fury.io/js/gen-logger)
Unlock the power of customizable logging with Gen Logger! This lightweight utility empowers developers to take control of their logs, offering dynamic options, customizable log types, and a sleek interface.
## Features
- **Customizable Logging**: Tailor your logging experience with customizable log types, colors, and labels to suit your application's needs.
- **Dynamic Options**: Easily configure logging options such as log level, scope, and more to adapt to different environments.
- **Sleek Interface**: Enjoy a clean and intuitive logging interface that makes debugging and monitoring a breeze.## Installation
Install the package via npm:
```bash
npm install gen-logger
```## Usage
### TypeScript Users
```typescript
import Logger from 'gen-logger';// Create a new instance of the Logger
const logger = new Logger();// Log messages
logger.info('Information message');
logger.warn('Warning message');
// Add more log statements as needed
```### CommonJS Users
```javascript
const Logger = require('gen-logger');// Create a new instance of the Logger
const logger = new Logger();// Log messages
logger.info('Information message');
logger.warn('Warning message');
// Add more log statements as needed
```# Preview
# Example
Common Js
```javascript
const Logger = require('gen-logger');// Create a new instance of the Logger
const logger = new Logger({
scope: "TEST", // Optional
disabled: false, // Optional
interactive: false, // Optional
logLevel: 'info', // Optional
});// Log messages
logger.info('Information message');
logger.warn('Warning message');
// Add more log statements as needed
```Typescript
```typescript
import Logger from 'gen-logger';// Create a new instance of the Logger
const logger = new Logger({
scope: "TEST", // Optional
disabled: false, // Optional
interactive: false, // Optional
logLevel: 'info', // Optional
});// Log messages
logger.info('Information message');
logger.warn('Warning message');
// Add more log statements as needed
```## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.