inklog
Version:
A colorful and beautiful terminal logger for Node.js with fixed-width output and smart default messages.
94 lines (60 loc) โข 1.95 kB
Markdown
# โจ inklog
> A clean, colorful terminal logger for Node.js โ 80-character styled logs for success, error, warning, and info.
**๐จโ๐ป Developed by [CodingOtt Systems](https://www.codingott.com)**
**๐ท๏ธ Tagline: _Building career without degree_**
## ๐ Features
- ๐ Fixed-width 80-character layout
- ๐จ Colored `SUCCESS`, `ERROR`, `WARNING`, `INFO` labels
- ๐งพ Dimmed and wrapped messages
- ๐ง Smart default fallback messages
- ๐ชถ Lightweight and easy to use
## ๐ฆ Installation
```bash
npm install inklog
# or
yarn add inklog
```
## ๐ Usage
```ts
import { successLog, errorLog, infoLog, warningLog } from 'inklog';
successLog('User created successfully');
errorLog('Failed to connect to the database');
infoLog('Server is running on port 3000');
warningLog('Low disk space detected');
```
### ๐งช Output
Example output (with colors):
```
[SUCCESS] User created successfully 00:00:01 PM
[ERROR ] Failed to connect to the database 00:00:02 PM
[INFO ] Server is running on port 3000 00:00:03 PM
[WARNING] Low disk space detected 00:00:04 PM
```
> The logger keeps each line neatly within 80 characters.
## ๐งฐ API
### `successLog(message?: string)`
Logs a green success message.
### `errorLog(message?: string)`
Logs a red error message.
### `infoLog(message?: string)`
Logs a blue info message.
### `warningLog(message?: string)`
Logs a yellow warning message.
## ๐งฑ Why Inklog?
Most logging libraries dump too much information or no style at all. `inklog` keeps it:
- โจ **Clean** โ fixed-width output
- ๐ฏ **Focused** โ only the message and time
- ๐ **Colorful** โ consistent styling out of the box
## ๐ค Contributing
Pull requests and feature suggestions are welcome!
## ๐ License
MIT ยฉ [CodingOtt Systems](https://www.codingott.com)