vona-core 5.0.70 → 5.0.72
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.
|
@@ -311,7 +311,8 @@ export class BeanContainer {
|
|
|
311
311
|
return Reflect.get(target, prop, receiver);
|
|
312
312
|
}
|
|
313
313
|
// aop chains
|
|
314
|
-
const
|
|
314
|
+
const methodNameMagic = '__method__';
|
|
315
|
+
const _aopChainsProp = this._getAopChainsProp(beanFullName, prop, methodNameMagic, 'method', prop);
|
|
315
316
|
if (!_aopChainsProp)
|
|
316
317
|
return Reflect.get(target, prop, receiver);
|
|
317
318
|
// proxy
|
|
@@ -424,7 +425,7 @@ export class BeanContainer {
|
|
|
424
425
|
}
|
|
425
426
|
chains.push([aopKey, fn]);
|
|
426
427
|
}
|
|
427
|
-
|
|
428
|
+
if (methodNameMagic && aop[methodNameMagic]) {
|
|
428
429
|
if (!__isLifeCycleMethod(methodName)) {
|
|
429
430
|
let fn;
|
|
430
431
|
if (methodType === 'get') {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import { replaceTemplate } from '@cabloy/utils';
|
|
1
2
|
import { formatLoggerAxiosError, formatLoggerConsole, formatLoggerFilter } from "./logger.js";
|
|
2
3
|
export function combineLoggerDefault(_appInfo, env) {
|
|
3
4
|
const configDefault = {
|
|
4
5
|
rotate: {
|
|
5
|
-
enable: true,
|
|
6
|
-
options(
|
|
6
|
+
enable: env.LOGGER_ROTATE_ENABLE === 'true',
|
|
7
|
+
options(filename) {
|
|
7
8
|
return {
|
|
8
|
-
filename:
|
|
9
|
-
datePattern:
|
|
10
|
-
maxSize:
|
|
11
|
-
maxFiles:
|
|
9
|
+
filename: replaceTemplate(env.LOGGER_ROTATE_FILENAME, { filename }),
|
|
10
|
+
datePattern: env.LOGGER_ROTATE_DATEPATTERN,
|
|
11
|
+
maxSize: env.LOGGER_ROTATE_MAXSIZE,
|
|
12
|
+
maxFiles: env.LOGGER_ROTATE_MAXFILES,
|
|
12
13
|
};
|
|
13
14
|
},
|
|
14
15
|
},
|
|
@@ -18,6 +19,10 @@ export function combineLoggerDefault(_appInfo, env) {
|
|
|
18
19
|
level: 'error',
|
|
19
20
|
format: format.combine(formatLoggerFilter({ level: 'error', strict: true }), format.json()),
|
|
20
21
|
}),
|
|
22
|
+
this.meta.logger.createTransportFile('warn', clientInfo, {
|
|
23
|
+
level: 'warn',
|
|
24
|
+
format: format.combine(formatLoggerFilter({ level: 'warn', strict: true }), format.json()),
|
|
25
|
+
}),
|
|
21
26
|
this.meta.logger.createTransportFile('http', clientInfo, {
|
|
22
27
|
level: 'http',
|
|
23
28
|
format: format.combine(formatLoggerFilter({ level: 'http', strict: true }), format.json()),
|
|
@@ -14,6 +14,11 @@ export interface VonaConfigEnv {
|
|
|
14
14
|
SERVER_LISTEN_DISABLE: 'true' | 'false' | undefined;
|
|
15
15
|
TEST_WHYISNODERUNNING: string | undefined;
|
|
16
16
|
LOGGER_DUMMY: 'true' | 'false' | undefined;
|
|
17
|
+
LOGGER_ROTATE_ENABLE: 'true' | 'false' | undefined;
|
|
18
|
+
LOGGER_ROTATE_FILENAME: string | undefined;
|
|
19
|
+
LOGGER_ROTATE_DATEPATTERN: string | undefined;
|
|
20
|
+
LOGGER_ROTATE_MAXSIZE: string | undefined;
|
|
21
|
+
LOGGER_ROTATE_MAXFILES: string | undefined;
|
|
17
22
|
}
|
|
18
23
|
declare global {
|
|
19
24
|
namespace NodeJS {
|