A logger that you can utilise within your projects
First install the module
npm install log-dot-js
Then add this code snippet to your file
const log = require('log-dot-js')
This is used to simply print a message along with your local time next to it without any color
Usage:
log.print("Your message");
Output:
This is used to display any sort of information you would like the user to know about
Usage:
log.info("Some information");
Output:
This is used to show the user a task has been succesfully completed
Usage:
log.success("Some operation completed successfully");
Output:
This is used to display a warning
Usage:
log.warn("Some warning");
Output:
Use this to display any message. This gets the message from the specified url.
var log = require('log-dot-js');
log.message("yoururlhere.domain");
Use this to store logs in a file.
The text is kept in a file and is overrun once the app is started again
You can use this multiple times within the file .
Usage:
log.writeFile("Info that you want to store");
Use this for a welcome message.
It will get your project name and version from the package.json.
If you do not have a package.json file it will produce an error.
Usage:
log.welcome();
Output