@janiscommerce/api
Advanced tools
Comparing version 6.2.2 to 6.3.0
@@ -9,2 +9,6 @@ # Changelog | ||
## [6.3.0] - 2021-06-11 | ||
### Added | ||
- Now API Request logs have basic information in the `message` property | ||
## [6.2.2] - 2021-05-10 | ||
@@ -11,0 +15,0 @@ ### Fixed |
@@ -52,2 +52,3 @@ 'use strict'; | ||
type: this.type, | ||
message: this.formatRequestMessage(api), | ||
...api.session.userId && { userCreated: api.session.userId }, | ||
@@ -58,2 +59,6 @@ log | ||
static formatRequestMessage({ httpMethod, endpoint, response }) { | ||
return `${httpMethod.toUpperCase()} /api/${endpoint} (${response.code})`; | ||
} | ||
static shouldCreateLog(api) { | ||
@@ -60,0 +65,0 @@ |
{ | ||
"name": "@janiscommerce/api", | ||
"version": "6.2.2", | ||
"version": "6.3.0", | ||
"description": "A package for managing API from any origin", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -9,4 +9,9 @@ export = LogHelper; | ||
static save(api: import('../api')): Promise<void>; | ||
static formatRequestMessage({ httpMethod, endpoint, response }: { | ||
httpMethod: any; | ||
endpoint: any; | ||
response: any; | ||
}): string; | ||
static shouldCreateLog(api: any): any; | ||
static generateId(): any; | ||
} |
38438
905