A Logger to Debug your JS Projects.
It logs the name of the function you called it in along with the message that you send with it
yarn add auto-log-me
OR
npm install auto-log-me
Import
const { autoLog, autoLogE, autoLogI, autoLogW } = require('auto-log-me');
OR
import { autoLog, autoLogE, autoLogI, autoLogW } from 'auto-log-me';
Functions
autoLog() --> for basic messages
autoLogI() --> for info messages
autoLogW() --> for warning messages
autoLogE() --> for error messages
Usage
const CalledInThis = () => {
const foo = "Value of foo";
const foosome = {
value: "This is a object"
};
autoLogI('Hi');
autoLogW('Hi');
autoLog('Hi');
autoLogE('Hi');
autoLogI();
autoLogW();
autoLog();
autoLogE();
autoLogI('', { foo, foosome });
autoLogW('', { foo, foosome });
autoLogE('You can even write errors', { foo, foosome });
autoLog('', { foo, foosome });
}
CalledInThis();
OUTPUT(Color Coded):