sm-utility 2.4.29 → 2.4.30
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/logger/index.js +6 -1
- package/package.json +1 -1
package/logger/index.js
CHANGED
|
@@ -18,7 +18,11 @@ function createLoggerMiddleware() {
|
|
|
18
18
|
express_winston_1.default.requestWhitelist.push("body", ...(config_1.configs.requestWhitelist || []));
|
|
19
19
|
express_winston_1.default.responseWhitelist.push("body", ...(config_1.configs.responseWhitelist || []));
|
|
20
20
|
return express_winston_1.default.logger({
|
|
21
|
-
statusLevels:
|
|
21
|
+
statusLevels: {
|
|
22
|
+
success: "info",
|
|
23
|
+
warn: "warning",
|
|
24
|
+
error: "error",
|
|
25
|
+
},
|
|
22
26
|
transports: (0, transports_1.getMiddlewareTransports)(),
|
|
23
27
|
requestFilter: (0, request_1.filterRequestHeaders)(config_1.configs.confidentialHeaders || []),
|
|
24
28
|
ignoreRoute: (req) => (0, route_1.shouldFilterRoute)(req.url, config_1.configs.ignoredRoutes || []),
|
|
@@ -37,6 +41,7 @@ function createLogger() {
|
|
|
37
41
|
return loggerInstance;
|
|
38
42
|
}
|
|
39
43
|
const logger = winston_1.default.createLogger({
|
|
44
|
+
levels: winston_1.default.config.syslog.levels,
|
|
40
45
|
exitOnError: false,
|
|
41
46
|
format: winston_1.default.format.combine(error_1.errorFormatter, (0, ecs_winston_format_1.default)({ convertReqRes: true })),
|
|
42
47
|
transports: (0, transports_1.getLoggerTransports)(),
|