@protagonists/logger
v1.1.1
Published
An upgrade on the default console
Downloads
3
Readme
About
A package to log stuff in a better format, as well as adding color functionnality!
Now working with version
1.1.2
of@protagonists/coerce
and1.1.2
of@protagonists/emitter
Table of content
The content below does not correspond to the object structure of the objects
How to use?
Description
The package allows for a slightly better visual on objects and whatnot, as well as allow users to add color to the logs!
Import
Terminal
npm install @protagonists/logger
Node.js
const { Logger, Color } = require("@protagonists/logger");
Example
Code:
// Imports
const { Logger } = require("@protagonists/logger");
// Create new Logger instance
const myLogger = new Logger({ file: "./someExistingFile.txt" });
// Log some text
myLogger.log("Hello world!");
Output:
./someExistingFile.txt
Logger: Hello world!