1.0.1 • Published 10 months ago

react-native-custom-log v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

React Native Custom Logger

A simple, color-coded logger utility for logging messages with different log levels in the terminal. This logger supports log types like info, debug, warn, error, and success, each with its own ANSI color code for easy differentiation. It also includes a timestamp and the screen name for better debugging context.

Features:

Color-Coded Logs: Messages are displayed with distinct colors based on their type (e.g., error in red, success in green).

Timestamps: Each log message includes the current date and time. Screen Name Context: Optionally log which screen or module the log is coming from.

Easy to Use: Just pass the message, screen name, and type of log (e.g., error, info), and it will format and print the log message in the console.

Installation

npm install -D react-native-custom-log

Usage

Here’s how to use the customLogger:

import { customLogger } from 'react-native-custom-log';

customLogger({messg: 'Hello World',screenName: 'Dashboard',type: 'error'});

1.0.1

10 months ago

1.0.0

10 months ago

0.1.1

2 years ago

0.1.0

2 years ago