namirasoft-log 1.1.2 → 1.2.0
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/dist/StreamConsole.js
CHANGED
|
@@ -26,23 +26,23 @@ class StreamConsole {
|
|
|
26
26
|
};
|
|
27
27
|
formated.forEach(f => {
|
|
28
28
|
if (log.level == LogLevel_1.LogLevel.Trace)
|
|
29
|
-
console.trace(
|
|
29
|
+
console.trace(colors.blue + f + colors.reset);
|
|
30
30
|
else if (log.level == LogLevel_1.LogLevel.Verbose)
|
|
31
|
-
console.log(
|
|
31
|
+
console.log(colors.cyan + f + colors.reset);
|
|
32
32
|
else if (log.level == LogLevel_1.LogLevel.Debug)
|
|
33
|
-
console.debug(
|
|
33
|
+
console.debug(colors.magenta + f + colors.reset);
|
|
34
34
|
else if (log.level == LogLevel_1.LogLevel.Info)
|
|
35
|
-
console.info(
|
|
35
|
+
console.info(colors.green + f + colors.reset);
|
|
36
36
|
else if (log.level == LogLevel_1.LogLevel.Warning)
|
|
37
|
-
console.warn(
|
|
37
|
+
console.warn(colors.yellow + f + colors.reset);
|
|
38
38
|
else if (log.level == LogLevel_1.LogLevel.Error)
|
|
39
|
-
console.error(
|
|
39
|
+
console.error(colors.red + f + colors.reset);
|
|
40
40
|
else if (log.level == LogLevel_1.LogLevel.Critical)
|
|
41
|
-
console.error(
|
|
41
|
+
console.error(colors.red + f + colors.reset);
|
|
42
42
|
else if (log.level == LogLevel_1.LogLevel.Fatal)
|
|
43
|
-
console.error(
|
|
43
|
+
console.error(colors.red + f + colors.reset);
|
|
44
44
|
else
|
|
45
|
-
console.log(
|
|
45
|
+
console.log(colors.white + f + colors.reset);
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StreamConsole.js","sourceRoot":"","sources":["../src/StreamConsole.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,yCAAsC;AAEtC,MA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",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"scripts": {},
|
|
8
8
|
"author": "Amir Abolhasani",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@types/node": "^20.
|
|
11
|
+
"@types/node": "^20.10.0"
|
|
12
12
|
}
|
|
13
13
|
}
|
package/src/StreamConsole.ts
CHANGED
|
@@ -19,23 +19,23 @@ export class StreamConsole implements IStream
|
|
|
19
19
|
formated.forEach(f =>
|
|
20
20
|
{
|
|
21
21
|
if (log.level == LogLevel.Trace)
|
|
22
|
-
console.trace(
|
|
22
|
+
console.trace(colors.blue + f + colors.reset);
|
|
23
23
|
else if (log.level == LogLevel.Verbose)
|
|
24
|
-
console.log(
|
|
24
|
+
console.log(colors.cyan + f + colors.reset);
|
|
25
25
|
else if (log.level == LogLevel.Debug)
|
|
26
|
-
console.debug(
|
|
26
|
+
console.debug(colors.magenta + f + colors.reset);
|
|
27
27
|
else if (log.level == LogLevel.Info)
|
|
28
|
-
console.info(
|
|
28
|
+
console.info(colors.green + f + colors.reset);
|
|
29
29
|
else if (log.level == LogLevel.Warning)
|
|
30
|
-
console.warn(
|
|
30
|
+
console.warn(colors.yellow + f + colors.reset);
|
|
31
31
|
else if (log.level == LogLevel.Error)
|
|
32
|
-
console.error(
|
|
32
|
+
console.error(colors.red + f + colors.reset);
|
|
33
33
|
else if (log.level == LogLevel.Critical)
|
|
34
|
-
console.error(
|
|
34
|
+
console.error(colors.red + f + colors.reset);
|
|
35
35
|
else if (log.level == LogLevel.Fatal)
|
|
36
|
-
console.error(
|
|
36
|
+
console.error(colors.red + f + colors.reset);
|
|
37
37
|
else
|
|
38
|
-
console.log(
|
|
38
|
+
console.log(colors.white + f + colors.reset);
|
|
39
39
|
})
|
|
40
40
|
}
|
|
41
41
|
}
|