2.1.1 • Published 1 year ago

better-cl v2.1.1

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
1 year ago

better-cl

Setup

Install

npm install better-cl

Usage

Bare minimum

require("better-cl").setup();

With options

require('better-cl').setup(console, methods, path, showTimestamp, showLabel);

console the console object to override. The standard console object is the default.

levels is an array of additional methods to add to the console object. The default methods are log, warn, error, info, debug and success. The default is [].

path is the location of the logs folder. if undefined, no logs will be saved. The default is undefined.

showTimestamp is a boolean, if true, the timestamp will be shown. The default is true.

showLabel is a boolean, if true, the label will be shown. The default is true.

Example

Code

require("better-cl").setup(console, [
{
  name:"simple",
  value: 1,
  color: "red"
}
], "logs");
console.simple("A simple example.");

Output

[hh:mm:ss.ddd] [SIMPLE] A simple example.
2.1.1

1 year ago

2.0.2

1 year ago

2.1.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago