1.1.0 • Published 6 years ago
line-console v1.1.0
Line Console
This is a line console. To explain. You can append stuff to the same message that you have previously entered into your console.
Getting Started
To get started you will need to run the command
npm i line-consoleUsage
An Example of this would be:
const { LineConsole } = require('line-console');
const con = new LineConsole();This will create a new line console.
const { LineConsole } = require('line-console');
const con = new LineConsole();
con.log("") //Your message.
con.err("") //Your Error.
con.warn("") //Your warning
con.clear() //Clears ConsoleLogger
To create a logger. (everytime you use the log function it will output to a file) Use this code:
// main.js
const { LineConsole } = require('line-console');
const path = require('path');
const con = new LineConsole();
con.setLogger(true, (path.join(__dirname, '/logs.log')));
con.log("pauwhgdu")
con.log("pauwhgdu")
con.log("pauwhgdu")Create the file logs.log (you can rename it)
Logs.log
[2020-05-10T21:30:25.633] [INFO] default - pauwhgdu
[2020-05-10T21:30:25.650] [INFO] default - pauwhgdu
[2020-05-10T21:30:25.656] [INFO] default - pauwhgduCredits
colors - A Colored Console. JohnWesiz - Most of the code from this package was made possiable with him/her