user-console
Version:
User Console for console with colors, emojis, and pretty logs.
55 lines (37 loc) • 1.42 kB
Markdown
**`user-console`** is an elegant and colorful logging utility for Node.js developers. It adds emojis and styles to standard `console.log` calls, making debugging easier and visually intuitive. Ideal for CLI tools, backend apps, or any project where you want more expressive logs.
```bash
npm install user-console
yarn add user-console
pnpm add user-console
```
```js
// Simple log
userConsole('This is an info message.');
// Log with level
userConsole('Everything is working perfectly!', 'success');
userConsole('This is a warning', 'warn');
userConsole('An error occurred', 'error');
userConsole('Debugging data', 'debug');
```
```bash
ℹ️ → This is an info message ← ℹ️
✅ → Everything is working perfectly! ← ✅
⚠️ → This is a warning ← ⚠️
❌ → An error occurred ← ❌
🐞 → Debugging data ← 🐞
```
| Parameter | Type | Description |
|-----------|----------|----------------------------------------------|
| `message` | `string` | The log message to print |
| `level` | `string` | The log level (`info`, `success`, `warn`, `error`, `debug`) |
- If no level is provided, it defaults to `info`.
- Emojis and colors are applied automatically based on the level.