UNPKG

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
# โœจ 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)