An open API service indexing awesome lists of open source software.

https://github.com/psparwez/better-consoley

Better-consoley It is a drop-in replacement for Node's default console that provides additional colors in console.
https://github.com/psparwez/better-consoley

better-console better-consoley cosnole

Last synced: 6 months ago
JSON representation

Better-consoley It is a drop-in replacement for Node's default console that provides additional colors in console.

Awesome Lists containing this project

README

          

> [!WARNING]
> This is under maintenance due to the Node.js environment.





# Better consoley

[![npm version](https://img.shields.io/npm/v/better-consoley.svg)](https://www.npmjs.com/package/better-consoley)

![Screenshot](https://github.com/user-attachments/assets/b5833f57-70eb-40bb-836e-118bd356b61f)

## A better console for Node project.
**`Better Consoley`** is a drop-in replacement for Node.js' default console, offering enhanced logging with colorful output. It works seamlessly with existing code and is safe to use as it delegates calls to native console methods for compatibility

## Installation

Install via **NPM**:
```shell
$ npm install better-consoley
```

## Methods

### ๐ŸŸข `success(message: string)`
Logs a success message with a green color.

### ๐ŸŸ  `warning(message: string)`
Logs a warning message with an orange color.

### ๐Ÿ”ต `info(message: string)`
Logs an informational message with a blue color.

### ๐Ÿ”ด `error(message: string)`
Logs an error message with a red color.

These methods work exactly same as native console methods but with colors.


# How to use it
You can override `console` object itself or assign better console to another variable like {Log}. It's completely safe to override the native console object because better consoley calls native console methods for methods that are already available in it.

```javascript

import { console } from "better-consoley";

console.success("Operation completed successfully!");
console.warning("This is a warning message.");
console.info("This is an info message.");
console.error("An error occurred!");

```

## Why Better Consoley?

- Ease of Use: Seamlessly integrates into your existing project.
- Enhanced Debugging: Visual distinctions between log levels.
- Safe and Compatible: Uses native console methods where applicable.
- Customizable: console log output to match your needs.






ยท [Issues](https://github.com/psparwez/better-consoley/issues)