💢 Make logging friendlier, simpler and use emojis in your messages. Try logger!
logger is available on npm/yarn:
$ npm install @codevor/logger.js --save
$ yarn add @codevor/logger.js
import Logger from '@codevor/logger.js';
Logger.success('Success message example.');
// => ✅ Success message example
Logger.error('Error message example.');
// => 🚫 Error message example
Logger.warn('Warning message example.');
// => ⚠️ Warning message example
Logger.info('Information message example.');
// => ℹ️ Informational message example
// PROMISE STATUSES LOGS
Logger.pending('Promise message example.', { hello: true });
// => ℹ️ Promise message example | pending {"hello":true}
Logger.fulfilled('Promise message example.', { hello: true });
// => ✅ Promise message example | fulfilled {"hello":true}
Logger.rejected('Promise message example.', { hello: true });
// => 🚫 Promise message example | rejected {"hello":true}
Logger.settled('Promise message example.', { hello: true });
// => ✅ Promise message example | settled {"hello":true}
const Logger = require('@codevor/logger.js');
Logger.success('Success message example.');
// => ✅ Success message example
Logger.error('Error message example.');
// => 🚫 Error message example
Logger.warn('Warning message example.');
// => ⚠️ Warning message example
Logger.info('Information message example.');
// => ℹ️ Informational message example
// PROMISE STATUSES LOGS
Logger.pending('Promise message example.', { hello: true });
// => ℹ️ Promise message example | pending {"hello":true}
Logger.fulfilled('Promise message example.', { hello: true });
// => ✅ Promise message example | fulfilled {"hello":true}
Logger.rejected('Promise message example.', { hello: true });
// => 🚫 Promise message example | rejected {"hello":true}
Logger.settled('Promise message example.', { hello: true });
// => ✅ Promise message example | settled {"hello":true}
Note: All promises convert objects to strings
Is it possible to change emojis for each message? Yes! Check it out:
import Logger, { Emoji } from '@codevor/logger.js';
Logger.success('Success message example.');
// => ✅ Success message example
Emoji.setEmoji({ type: 'success', emoji: '🐶' });
Logger.success('Success message example.');
// => 🐶 Success message example
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
This project adheres to Semantic Versioning. Every release, along with the migration instructions, is documented on the Github Releases page.
Report bugs or do suggestions using the issues.