@node-cli/logger 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +157 -0
- package/dist/Logger.d.ts +6 -17
- package/dist/Logger.js +38 -38
- package/dist/Logger.js.map +1 -0
- package/package.json +8 -6
package/README.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Node CLI Logger
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
> Logger is a dead-simple console logger for nodejs command-line applications.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
> cd your-project
|
|
11
|
+
> npm install --save-dev @node-cli/logger
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
import { Logger } from "@node-cli/logger";
|
|
18
|
+
const log = new Logger();
|
|
19
|
+
|
|
20
|
+
log.info("this is an informational log");
|
|
21
|
+
log.warn("this is a warning log");
|
|
22
|
+
log.error("this is an error log");
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## API
|
|
26
|
+
|
|
27
|
+
### Methods
|
|
28
|
+
|
|
29
|
+
Logger relies on `console` behind the scenes, and therefore supports the same [string substitution](https://developer.mozilla.org/en-US/docs/Web/API/console#Using_string_substitutions) capabilities and uses the following methods:
|
|
30
|
+
|
|
31
|
+
| Method | Description | Output color |
|
|
32
|
+
| ------ | --------------------------------------------------------- | ------------ |
|
|
33
|
+
| debug | Outputs a message to the console with the log level debug | grey |
|
|
34
|
+
| log | For general output of logging information. | white |
|
|
35
|
+
| info | Informative logging of information. | blue |
|
|
36
|
+
| warn | Outputs a message to the console with the log level debug | yellow |
|
|
37
|
+
| error | Outputs an error message. | red |
|
|
38
|
+
|
|
39
|
+
### Options
|
|
40
|
+
|
|
41
|
+
#### Disabling logging
|
|
42
|
+
|
|
43
|
+
You can disable logging with `silent`:
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
import { Logger } from "@node-cli/logger";
|
|
47
|
+
const log = new Logger();
|
|
48
|
+
|
|
49
|
+
log.info("this will be logged");
|
|
50
|
+
// disabling logs in production for example
|
|
51
|
+
log.silent = process.env.NODE_ENV === "production";
|
|
52
|
+
log.info("but this will not");
|
|
53
|
+
log.silent = false;
|
|
54
|
+
log.info("this will be logged again!");
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
This option can also be passed to the constructor:
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
import { Logger } from "@node-cli/logger";
|
|
61
|
+
const log = new Logger({ silent: true });
|
|
62
|
+
|
|
63
|
+
log.info("this will not be logged");
|
|
64
|
+
log.silent = false;
|
|
65
|
+
log.info("this will be logged again!");
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Disabling colors
|
|
69
|
+
|
|
70
|
+
You can disable colors with `boring`:
|
|
71
|
+
|
|
72
|
+
```js
|
|
73
|
+
import { Logger } from "@node-cli/logger";
|
|
74
|
+
const log = new Logger();
|
|
75
|
+
|
|
76
|
+
log.info("this will be logged in the default [info] color");
|
|
77
|
+
// disabling colors in test mode for example
|
|
78
|
+
log.boring = process.env.NODE_ENV === "test";
|
|
79
|
+
log.info("but this will not have any colors :/");
|
|
80
|
+
log.boring = false;
|
|
81
|
+
log.info("colors are back!");
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
This option can also be passed to the constructor:
|
|
85
|
+
|
|
86
|
+
```js
|
|
87
|
+
import { Logger } from "@node-cli/logger";
|
|
88
|
+
const log = new Logger({ boring: true });
|
|
89
|
+
|
|
90
|
+
log.info("this will not be logged in color");
|
|
91
|
+
log.boring = false;
|
|
92
|
+
log.info("this will be logged again!");
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Adding a prefix
|
|
96
|
+
|
|
97
|
+
You can add a prefix to the logs with `prefix`:
|
|
98
|
+
|
|
99
|
+
```js
|
|
100
|
+
import { Logger } from "@node-cli/logger";
|
|
101
|
+
const log = new Logger();
|
|
102
|
+
|
|
103
|
+
log.info("this will be logged with no prefix");
|
|
104
|
+
log.prefix = "[INFO]";
|
|
105
|
+
log.info("this will have a prefix!");
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The output of that last line would be:
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
> [INFO] this will have a prefix!
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
This option can also be passed to the constructor:
|
|
115
|
+
|
|
116
|
+
```js
|
|
117
|
+
import { Logger } from "@node-cli/logger";
|
|
118
|
+
const log = new Logger({ prefix: "Log:" });
|
|
119
|
+
|
|
120
|
+
log.info("this will be logged with a prefix");
|
|
121
|
+
log.prefix = false;
|
|
122
|
+
log.info("this will be NOT be logged with a prefix");
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Adding a local timestamp
|
|
126
|
+
|
|
127
|
+
You can add a timestamp to the logs with `timestamp`:
|
|
128
|
+
|
|
129
|
+
```js
|
|
130
|
+
import { Logger } from "@node-cli/logger";
|
|
131
|
+
const log = new Logger();
|
|
132
|
+
|
|
133
|
+
log.info("this will be logged with no timestamp");
|
|
134
|
+
log.timestamp = true;
|
|
135
|
+
log.info("this will have a timestamp!");
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The output of that last line would look like:
|
|
139
|
+
|
|
140
|
+
```sh
|
|
141
|
+
> [ Tue Feb 02 2021 8:32:58 PM ] this will have a timestamp!
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
This option can also be passed to the constructor:
|
|
145
|
+
|
|
146
|
+
```js
|
|
147
|
+
import { Logger } from "@node-cli/logger";
|
|
148
|
+
const log = new Logger({ timestamp: true });
|
|
149
|
+
|
|
150
|
+
log.info("this will be logged with a timestamp");
|
|
151
|
+
log.timestamp = false;
|
|
152
|
+
log.info("this will be NOT be logged with a timestamp");
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## License
|
|
156
|
+
|
|
157
|
+
MIT © Arno Versini
|
package/dist/Logger.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
export declare class Logger {
|
|
2
|
-
|
|
3
|
-
globalPrefix: string;
|
|
4
|
-
showTimestamp: boolean;
|
|
5
|
-
printOptions: {
|
|
6
|
-
colors: boolean;
|
|
7
|
-
compact: boolean;
|
|
8
|
-
depth: number;
|
|
9
|
-
};
|
|
2
|
+
#private;
|
|
10
3
|
constructor({ boring, silent, prefix, timestamp, }?: {
|
|
11
4
|
boring?: boolean;
|
|
12
5
|
silent?: boolean;
|
|
@@ -17,13 +10,9 @@ export declare class Logger {
|
|
|
17
10
|
set boring(flag: boolean);
|
|
18
11
|
set prefix(prefix: string);
|
|
19
12
|
set timestamp(flag: boolean);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
log(...args: any): void;
|
|
26
|
-
debug(...args: any): void;
|
|
27
|
-
warn(...args: any): void;
|
|
28
|
-
error(...args: any): void;
|
|
13
|
+
info(...arguments_: any): void;
|
|
14
|
+
log(...arguments_: any): void;
|
|
15
|
+
debug(...arguments_: any): void;
|
|
16
|
+
warn(...arguments_: any): void;
|
|
17
|
+
error(...arguments_: any): void;
|
|
29
18
|
}
|
package/dist/Logger.js
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
1
|
import kleur from "kleur";
|
|
2
2
|
import util from "node:util";
|
|
3
3
|
export class Logger {
|
|
4
|
-
shouldLog;
|
|
5
|
-
globalPrefix;
|
|
6
|
-
showTimestamp;
|
|
7
|
-
printOptions;
|
|
4
|
+
#shouldLog;
|
|
5
|
+
#globalPrefix;
|
|
6
|
+
#showTimestamp;
|
|
7
|
+
#printOptions;
|
|
8
8
|
constructor({ boring =false , silent =false , prefix ="" , timestamp =false } = {}){
|
|
9
|
-
this
|
|
10
|
-
this
|
|
11
|
-
this
|
|
12
|
-
this
|
|
9
|
+
this.#shouldLog = !silent;
|
|
10
|
+
this.#globalPrefix = prefix;
|
|
11
|
+
this.#showTimestamp = timestamp;
|
|
12
|
+
this.#printOptions = {
|
|
13
13
|
colors: !boring,
|
|
14
14
|
compact: false,
|
|
15
15
|
depth: 5
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
set silent(flag) {
|
|
19
|
-
this
|
|
19
|
+
this.#shouldLog = !flag;
|
|
20
20
|
}
|
|
21
21
|
set boring(flag) {
|
|
22
|
-
this
|
|
22
|
+
this.#printOptions.colors = !flag;
|
|
23
23
|
}
|
|
24
24
|
set prefix(prefix) {
|
|
25
|
-
this
|
|
25
|
+
this.#globalPrefix = prefix;
|
|
26
26
|
}
|
|
27
27
|
set timestamp(flag) {
|
|
28
|
-
this
|
|
28
|
+
this.#showTimestamp = flag;
|
|
29
29
|
}
|
|
30
|
-
_log(type, ...
|
|
31
|
-
if (this
|
|
32
|
-
let
|
|
33
|
-
if (!this
|
|
34
|
-
|
|
30
|
+
#_log(type, ...arguments_) {
|
|
31
|
+
if (this.#shouldLog) {
|
|
32
|
+
let message;
|
|
33
|
+
if (!this.#showTimestamp && !this.#globalPrefix) {
|
|
34
|
+
message = util.formatWithOptions(this.#printOptions, ...arguments_);
|
|
35
35
|
} else {
|
|
36
|
-
const prefix = this
|
|
37
|
-
this
|
|
36
|
+
const prefix = this.#globalPrefix ? [
|
|
37
|
+
this.#globalPrefix
|
|
38
38
|
] : [];
|
|
39
|
-
if (this
|
|
39
|
+
if (this.#showTimestamp) {
|
|
40
40
|
const now = new Date();
|
|
41
|
-
prefix.push(this
|
|
41
|
+
prefix.push(this.#printOptions.colors ? `${kleur.grey(`[ ${now.toDateString()} ${now.toLocaleTimeString()} ]`)}` : `[ ${now.toDateString()} ${now.toLocaleTimeString()} ]`);
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
message = util.formatWithOptions(this.#printOptions, prefix.join(" "), ...arguments_);
|
|
44
44
|
}
|
|
45
|
-
console[type.method](this
|
|
45
|
+
console[type.method](this.#printOptions.colors ? `${type.color(message)}` : message);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
info(...
|
|
49
|
-
this
|
|
48
|
+
info(...arguments_) {
|
|
49
|
+
this.#_log({
|
|
50
50
|
method: "info",
|
|
51
51
|
color: kleur.blue
|
|
52
|
-
}, ...
|
|
52
|
+
}, ...arguments_);
|
|
53
53
|
}
|
|
54
|
-
log(...
|
|
55
|
-
this
|
|
54
|
+
log(...arguments_) {
|
|
55
|
+
this.#_log({
|
|
56
56
|
method: "log",
|
|
57
57
|
color: kleur.white
|
|
58
|
-
}, ...
|
|
58
|
+
}, ...arguments_);
|
|
59
59
|
}
|
|
60
|
-
debug(...
|
|
61
|
-
this
|
|
60
|
+
debug(...arguments_) {
|
|
61
|
+
this.#_log({
|
|
62
62
|
method: "debug",
|
|
63
63
|
color: kleur.grey
|
|
64
|
-
}, ...
|
|
64
|
+
}, ...arguments_);
|
|
65
65
|
}
|
|
66
|
-
warn(...
|
|
67
|
-
this
|
|
66
|
+
warn(...arguments_) {
|
|
67
|
+
this.#_log({
|
|
68
68
|
method: "warn",
|
|
69
69
|
color: kleur.yellow
|
|
70
|
-
}, ...
|
|
70
|
+
}, ...arguments_);
|
|
71
71
|
}
|
|
72
|
-
error(...
|
|
73
|
-
this
|
|
72
|
+
error(...arguments_) {
|
|
73
|
+
this.#_log({
|
|
74
74
|
method: "error",
|
|
75
75
|
color: kleur.red
|
|
76
|
-
}, ...
|
|
76
|
+
}, ...arguments_);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Logger.ts"],"sourcesContent":["import kleur from \"kleur\";\nimport util from \"node:util\";\n\nexport class Logger {\n\t#shouldLog: boolean;\n\t#globalPrefix: string;\n\t#showTimestamp: boolean;\n\t#printOptions: { colors: boolean; compact: boolean; depth: number };\n\n\tconstructor({\n\t\tboring = false,\n\t\tsilent = false,\n\t\tprefix = \"\",\n\t\ttimestamp = false,\n\t} = {}) {\n\t\tthis.#shouldLog = !silent;\n\t\tthis.#globalPrefix = prefix;\n\t\tthis.#showTimestamp = timestamp;\n\t\tthis.#printOptions = {\n\t\t\tcolors: !boring,\n\t\t\tcompact: false,\n\t\t\tdepth: 5,\n\t\t};\n\t}\n\n\tset silent(flag: boolean) {\n\t\tthis.#shouldLog = !flag;\n\t}\n\n\tset boring(flag: boolean) {\n\t\tthis.#printOptions.colors = !flag;\n\t}\n\n\tset prefix(prefix: string) {\n\t\tthis.#globalPrefix = prefix;\n\t}\n\n\tset timestamp(flag: boolean) {\n\t\tthis.#showTimestamp = flag;\n\t}\n\n\t#_log(\n\t\ttype: { method: string | number; color: (argument0: any) => any },\n\t\t...arguments_: string[]\n\t) {\n\t\tif (this.#shouldLog) {\n\t\t\tlet message: string;\n\t\t\tif (!this.#showTimestamp && !this.#globalPrefix) {\n\t\t\t\tmessage = util.formatWithOptions(this.#printOptions, ...arguments_);\n\t\t\t} else {\n\t\t\t\tconst prefix = this.#globalPrefix ? [this.#globalPrefix] : [];\n\t\t\t\tif (this.#showTimestamp) {\n\t\t\t\t\tconst now = new Date();\n\t\t\t\t\tprefix.push(\n\t\t\t\t\t\tthis.#printOptions.colors\n\t\t\t\t\t\t\t? `${kleur.grey(\n\t\t\t\t\t\t\t\t\t`[ ${now.toDateString()} ${now.toLocaleTimeString()} ]`\n\t\t\t\t\t\t\t )}`\n\t\t\t\t\t\t\t: `[ ${now.toDateString()} ${now.toLocaleTimeString()} ]`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tmessage = util.formatWithOptions(\n\t\t\t\t\tthis.#printOptions,\n\t\t\t\t\tprefix.join(\" \"),\n\t\t\t\t\t...arguments_\n\t\t\t\t);\n\t\t\t}\n\t\t\tconsole[type.method](\n\t\t\t\tthis.#printOptions.colors ? `${type.color(message)}` : message\n\t\t\t);\n\t\t}\n\t}\n\n\tinfo(...arguments_: any) {\n\t\tthis.#_log({ method: \"info\", color: kleur.blue }, ...arguments_);\n\t}\n\n\tlog(...arguments_: any) {\n\t\tthis.#_log({ method: \"log\", color: kleur.white }, ...arguments_);\n\t}\n\n\tdebug(...arguments_: any) {\n\t\tthis.#_log({ method: \"debug\", color: kleur.grey }, ...arguments_);\n\t}\n\n\twarn(...arguments_: any) {\n\t\tthis.#_log({ method: \"warn\", color: kleur.yellow }, ...arguments_);\n\t}\n\n\terror(...arguments_: any) {\n\t\tthis.#_log({ method: \"error\", color: kleur.red }, ...arguments_);\n\t}\n}\n"],"names":["kleur","util","Logger","shouldLog","globalPrefix","showTimestamp","printOptions","constructor","boring","silent","prefix","timestamp","colors","compact","depth","flag","_log","type","arguments_","message","formatWithOptions","now","Date","push","grey","toDateString","toLocaleTimeString","join","console","method","color","info","blue","log","white","debug","warn","yellow","error","red"],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-cli/logger",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"description": "A tiny console logger for nodejs CLI apps",
|
|
@@ -10,20 +10,22 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"dist"
|
|
12
12
|
],
|
|
13
|
+
"node": ">=16",
|
|
13
14
|
"dependencies": {
|
|
14
15
|
"kleur": "4.1.5"
|
|
15
16
|
},
|
|
16
17
|
"scripts": {
|
|
17
|
-
"build": "npm-run-all --serial clean build:types build:js
|
|
18
|
-
"build:
|
|
19
|
-
"build:js": "swc --out-dir dist src",
|
|
18
|
+
"build": "npm-run-all --serial clean build:types build:js",
|
|
19
|
+
"build:js": "swc --source-maps --out-dir dist src",
|
|
20
20
|
"build:types": "tsc",
|
|
21
21
|
"clean": "rimraf dist types coverage",
|
|
22
|
+
"lint": "eslint \"src/*.ts\"",
|
|
22
23
|
"test": "jest",
|
|
23
|
-
"test:coverage": "npm run test -- --coverage"
|
|
24
|
+
"test:coverage": "npm run test -- --coverage",
|
|
25
|
+
"watch": "swc --watch --out-dir dist src"
|
|
24
26
|
},
|
|
25
27
|
"publishConfig": {
|
|
26
28
|
"access": "public"
|
|
27
29
|
},
|
|
28
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "19d2ea42b43364d5208bda01c93b75efc90d36d7"
|
|
29
31
|
}
|