-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsole.js
37 lines (35 loc) · 837 Bytes
/
console.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const { color } = require('console-log-colors')
// + color.gray("]")
const logs = {
success: (
color.bgGreen.greenBright(" Success ") +
color.reset(" ")
),
log: (
color.bgMagenta.magentaBright(" Log ") +
color.reset(" ")
),
warning: (
color.bgYellow.yellowBright(" Warning ") +
color.reset(" ")
),
error: (
color.bgRed.redBright(" Error ") +
color.reset(" ")
),
};
const useLog = {
success: function(content) {
console.log(logs.success + content);
},
log: function(content) {
console.log(logs.log + content);
},
warning: function(content) {
console.log(logs.warning + content);
},
error: function(content) {
console.log(logs.error + content);
}
};
module.exports = { useLog }