@apigames/logger
Advanced tools
Comparing version 22.1.0-dev.7 to 22.1.0-dev.8
@@ -25,4 +25,7 @@ "use strict"; | ||
console.log(`${messageDate.toISOString()} ${typeStr.toUpperCase()} ${message}`); | ||
if (!(0, json_1.isEmpty)(payload)) { | ||
console.log(`${messageDate.toISOString()} PAYLOAD ${JSON.stringify(payload)}`); | ||
if ((0, json_1.isDefined)(payload)) { | ||
let payloadObject = payload; | ||
if ((0, json_1.isError)(payload)) | ||
payloadObject = { name: payload.name, message: payload.message }; | ||
console.log(`${messageDate.toISOString()} PAYLOAD ${JSON.stringify(payloadObject)}`); | ||
} | ||
@@ -29,0 +32,0 @@ }), |
@@ -27,4 +27,7 @@ "use strict"; | ||
console.log(`${messageDate.toISOString()} ${typeStr.toUpperCase()} ${message}`); | ||
if (!(0, json_1.isEmpty)(payload)) { | ||
console.log(`${messageDate.toISOString()} PAYLOAD [${JSON.stringify(payload).length} bytes]`); | ||
if ((0, json_1.isDefined)(payload)) { | ||
let payloadObject = payload; | ||
if ((0, json_1.isError)(payload)) | ||
payloadObject = { name: payload.name, message: payload.message }; | ||
console.log(`${messageDate.toISOString()} PAYLOAD ${JSON.stringify(payloadObject)}`); | ||
} | ||
@@ -31,0 +34,0 @@ } |
@@ -6,3 +6,3 @@ { | ||
"license": "UNLICENSED", | ||
"version": "22.1.0-dev.7", | ||
"version": "22.1.0-dev.8", | ||
"main": "lib/index.js", | ||
@@ -9,0 +9,0 @@ "types": "lib/index.d.ts", |
10414
117