colored-logs
v2.0.1
Published
Print beautiful logs with no effort, just like that!
Downloads
1
Readme
Colored Logs
Print beautiful logs with no effort, just like that!
Usage
Basic
const {Logger} = require("colored-logs");
Logger.info("This is a info message.");
Logger.debug("Secret stuff hidden from users.");
Logger.warn("This is a test warn message.");
Logger.error(new Error(`Little Error`), "looking on this error");
With Custom Options
const {Logger} = require("colored-logs");
new Logger({
level: "info",
filePath: "./path/to/file.log"
});
Logger.info("This is a info message.");
Logger.debug("Secret stuff hidden from users.");
Logger.warn("This is a test warn message.");
Logger.error(new Error(`Little Error`), "looking on this error");
Configuration Options
LoggerOptions
: Configures logger to fit your needs. Possible values:level
- Logging levels conform to the severity ordering specified by "from most important to least important"filePath
- Path to a file in which logs will appeartimezone
- Controls timezone that is used across the Loggertimed_logs
- If enabled andfilePath
is not set creates a log file with time of the first log.