0.0.3 โข Published 6 months ago
logato v0.0.3
Simple Logger (logato) ๐
A simple, fast, and minimal logger for Node.js ๐. Perfect for logging information, warnings, errors, and more with ease and speed!
Installation ๐
npm
npm install logato
yarn
yarn add logato
pnpm
pnpm add logato
bun
bun add logato
Install from GitHub registry:
- Ensure you have set up GitHub Packages authentication.
- Run the following command to install from GitHub:
npm install @devnshankar/logato@0.0.3 --registry=https://npm.pkg.github.com
Usage ๐
Once installed, you can use the logger in your Node.js project.
import logato from 'logato';
// Logging to console
logato.log('This is a log message');
logato.info('This is an info message');
logato.warn('This is a warning message');
logato.error('This is an error message');
logato.debug('This is a debug message');
logato.success('Operation was successful!');
// Print contents of a file
// make sure the assets folder is in the root of the project
logato.file('./assets/data.txt');
Methods:
logato.log(message)
- Logs a generic messagelogato.info(message)
- Logs an informational messagelogato.warn(message)
- Logs a warning messagelogato.error(message)
- Logs an error message
Features โจ
- Simple: Just a few lines of code to get started.
- Fast: Optimized for speed, ideal for production.
- Minimal: No unnecessary featuresโjust what you need.
License ๐
MIT License.