@athenna/http 3.10.0 → 3.11.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/package.json
CHANGED
|
@@ -13,13 +13,13 @@ export class HttpExceptionHandler {
|
|
|
13
13
|
* Error codes that should be ignored from logging.
|
|
14
14
|
*/
|
|
15
15
|
get ignoreCodes() {
|
|
16
|
-
return [];
|
|
16
|
+
return Config.get('http.logger.ignoreCodes', []);
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Error statuses that should be ignored from logging.
|
|
20
20
|
*/
|
|
21
21
|
get ignoreStatuses() {
|
|
22
|
-
return [];
|
|
22
|
+
return Config.get('http.logger.ignoreStatuses', []);
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* The exception handler of all request handlers.
|
|
@@ -75,7 +75,8 @@ export class HttpKernel {
|
|
|
75
75
|
* Register the global log terminator in the Http server.
|
|
76
76
|
*/
|
|
77
77
|
async registerLoggerTerminator() {
|
|
78
|
-
if (!Config.exists('http.logger') ||
|
|
78
|
+
if (!Config.exists('http.logger.enabled') ||
|
|
79
|
+
Config.is('http.logger.enabled', false)) {
|
|
79
80
|
return;
|
|
80
81
|
}
|
|
81
82
|
Server.terminate(ctx => Log.channelOrVanilla('request').info(ctx));
|