alemonjs 1.0.50 → 1.0.51
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/lib/core/configs.js +1 -1
- package/lib/logs.js +5 -5
- package/logs.d.ts +1 -4
- package/logs.js +5 -5
- package/package.json +1 -1
- package/types/logs.d.ts +1 -1
package/lib/core/configs.js
CHANGED
package/lib/logs.js
CHANGED
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
* @param fun 中间值
|
|
4
4
|
* @param prefix 前缀
|
|
5
5
|
*/
|
|
6
|
-
export function setLog(fun
|
|
6
|
+
export function setLog(fun) {
|
|
7
7
|
const log = console.log;
|
|
8
8
|
global.console.log = (...argv) => {
|
|
9
|
-
log(
|
|
9
|
+
log(fun(), ...argv);
|
|
10
10
|
};
|
|
11
11
|
const info = console.info;
|
|
12
12
|
global.console.info = (...argv) => {
|
|
13
|
-
info(
|
|
13
|
+
info(fun(), ...argv);
|
|
14
14
|
};
|
|
15
15
|
const error = console.error;
|
|
16
16
|
global.console.error = (...argv) => {
|
|
17
|
-
error(
|
|
17
|
+
error(fun(), ...argv);
|
|
18
18
|
};
|
|
19
19
|
const debug = console.debug;
|
|
20
20
|
global.console.debug = (...argv) => {
|
|
21
|
-
debug(
|
|
21
|
+
debug(fun(), ...argv);
|
|
22
22
|
};
|
|
23
23
|
}
|
package/logs.d.ts
CHANGED
package/logs.js
CHANGED
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
* @param fun 中间值
|
|
4
4
|
* @param prefix 前缀
|
|
5
5
|
*/
|
|
6
|
-
export function setLog(fun
|
|
6
|
+
export function setLog(fun) {
|
|
7
7
|
const log = console.log
|
|
8
8
|
global.console.log = (...argv) => {
|
|
9
|
-
log(
|
|
9
|
+
log(fun(), ...argv)
|
|
10
10
|
}
|
|
11
11
|
const info = console.info
|
|
12
12
|
global.console.info = (...argv) => {
|
|
13
|
-
info(
|
|
13
|
+
info(fun(), ...argv)
|
|
14
14
|
}
|
|
15
15
|
const error = console.error
|
|
16
16
|
global.console.error = (...argv) => {
|
|
17
|
-
error(
|
|
17
|
+
error(fun(), ...argv)
|
|
18
18
|
}
|
|
19
19
|
const debug = console.debug
|
|
20
20
|
global.console.debug = (...argv) => {
|
|
21
|
-
debug(
|
|
21
|
+
debug(fun(), ...argv)
|
|
22
22
|
}
|
|
23
23
|
}
|
package/package.json
CHANGED
package/types/logs.d.ts
CHANGED