koatty_exception
Advanced tools
Comparing version 1.3.2-5 to 1.3.2-6
@@ -5,2 +5,4 @@ # Changelog | ||
### [1.3.2-6](https://github.com/koatty/koatty_exception/compare/v1.3.2-5...v1.3.2-6) (2024-01-24) | ||
### [1.3.2-5](https://github.com/koatty/koatty_exception/compare/v1.3.2-4...v1.3.2-5) (2024-01-24) | ||
@@ -7,0 +9,0 @@ |
/*! | ||
* @Author: richen | ||
* @Date: 2024-01-24 15:16:33 | ||
* @Date: 2024-01-24 15:57:28 | ||
* @License: BSD (3-Clause) | ||
@@ -5,0 +5,0 @@ * @Copyright (c) - <richenlin(at)gmail.com> |
/*! | ||
* @Author: richen | ||
* @Date: 2024-01-24 15:16:23 | ||
* @Date: 2024-01-24 15:57:17 | ||
* @License: BSD (3-Clause) | ||
@@ -626,8 +626,11 @@ * @Copyright (c) - <richenlin(at)gmail.com> | ||
const now = Date.now(); | ||
const path = ctx.originalPath || '/'; | ||
const duration = (now - ctx.startTime) || 0; | ||
koatty_logger.DefaultLogger.Error(`{"startTime":"${ctx.startTime}","duration":"${duration}","requestId":"${ctx.requestId}","endTime":"${now}","path":"${path}","message":"${this.message}","stack":"${this.stack}"`); | ||
const message = { | ||
"startTime": ctx.startTime, | ||
"duration": (now - ctx.startTime) || 0, | ||
"duration": duration, | ||
"requestId": ctx.requestId, | ||
"endTime": now, | ||
"path": ctx.originalPath || '/', | ||
"path": path, | ||
"message": this.message, | ||
@@ -639,3 +642,2 @@ }; | ||
} | ||
koatty_logger.DefaultLogger.Error(message); | ||
// span | ||
@@ -642,0 +644,0 @@ if (this.span) { |
{ | ||
"name": "koatty_exception", | ||
"version": "1.3.2-5", | ||
"version": "1.3.2-6", | ||
"description": "Exception handler for koatty.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
{ | ||
"name": "koatty_exception", | ||
"version": "1.3.2-5", | ||
"version": "1.3.2-6", | ||
"description": "Exception handler for koatty.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
98881
1985