@apigames/logger
Advanced tools
Comparing version 1.0.6 to 1.0.7
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var _a; | ||
@@ -7,3 +16,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
}, | ||
_a.write = (type, message, payload) => { | ||
_a.write = (type, message, payload) => __awaiter(void 0, void 0, void 0, function* () { | ||
console.log(`${type}: ${message}`); | ||
@@ -13,4 +22,4 @@ if (!json_1.isEmpty(payload)) { | ||
} | ||
}, | ||
}), | ||
_a); | ||
exports.default = ConsoleLogger; |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var _a; | ||
@@ -6,4 +15,4 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
}, | ||
_a.write = jest.fn((type, message, payload) => { }), | ||
_a.write = jest.fn((type, message, payload) => __awaiter(void 0, void 0, void 0, function* () { })), | ||
_a); | ||
exports.default = MockLogger; |
@@ -9,3 +9,3 @@ export declare enum LoggerMessageType { | ||
export interface ILogger { | ||
write(type: LoggerMessageType, message: string, payload?: LoggerPayload): void; | ||
write(type: LoggerMessageType, message: string, payload?: LoggerPayload): Promise<void>; | ||
} |
@@ -6,3 +6,3 @@ { | ||
"license": "UNLICENSED", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"main": "lib/index.js", | ||
@@ -9,0 +9,0 @@ "types": "lib/index.d.ts", |
6437
88