Setup
//requires and setups the package
const { console } = require('console-formatted')
With this you can still use the normal console.log
it just added th new formated function to it
Use
console.format.log("Hello World!")
//this also works with: debug, info, warn and error
if You want to log it without the date use the option like below
console.format.log('Hello World!', {date: false})
Override the default color
If you want to override the default color u can use the color option like so
console.format.log('Hello World!', {color: "Yellow"})
console.format.log('Hello World!', {color: "Blue"})
console.format.log('Hello World!', {color: "Red"})
Colors
Colors can be used by calling the color function from the setup on setup u have to add colors to the require satment
like so
const {console, colors} = require('console-formatted')
Then Colors can be called and used in a console.log function like so
console.log(`${colors.text.Green}Hello ${colors.text.Blue} World${colors.text.Yellow}!${colors.other.Reset}`)
You can also call this in the format function like so
console.format.log(`${colors.text.Green}Hello ${colors.text.Blue} World${colors.text.Yellow}!${colors.other.Reset}`)
And the output would be