line-console

1.1.0 • Public • Published

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-console

Usage

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 Console

Logger

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 - pauwhgdu
 

Credits

colors - A Colored Console. JohnWesiz - Most of the code from this package was made possiable with him/her

Package Sidebar

Install

npm i line-console

Weekly Downloads

1

Version

1.1.0

License

ISC

Unpacked Size

4.43 kB

Total Files

5

Last publish

Collaborators

  • micc281