ts-composite-logger
Advanced tools
Comparing version 1.2.6 to 1.2.7
@@ -1,2 +0,2 @@ | ||
declare const _default: { | ||
export declare const LogCode: { | ||
GENERAL_INFO: number; | ||
@@ -8,2 +8,1 @@ GENERAL_WARNING: number; | ||
}; | ||
export default _default; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = { | ||
exports.LogCode = { | ||
// general codes | ||
@@ -5,0 +5,0 @@ GENERAL_INFO: 1, |
@@ -8,2 +8,3 @@ import { ILoggerChannel } from "./interfaces/ILoggerChannel"; | ||
export { ILogMessage } from "./interfaces/ILogMessage"; | ||
export { LogCode } from "./constants/LogCode"; | ||
export declare class Logger { | ||
@@ -10,0 +11,0 @@ private readonly channels; |
@@ -15,3 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const LogCode_1 = __importDefault(require("./constants/LogCode")); | ||
const LogCode_1 = require("./constants/LogCode"); | ||
const LogLevel_1 = require("./constants/LogLevel"); | ||
@@ -24,2 +24,4 @@ const promise_all_settled_1 = __importDefault(require("promise-all-settled")); | ||
exports.LogLevel = LogLevel_2.LogLevel; | ||
var LogCode_2 = require("./constants/LogCode"); | ||
exports.LogCode = LogCode_2.LogCode; | ||
class Logger { | ||
@@ -50,3 +52,3 @@ constructor() { | ||
} | ||
error(message, code = LogCode_1.default.GENERAL_ERROR, object = {}) { | ||
error(message, code = LogCode_1.LogCode.GENERAL_ERROR, object = {}) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -63,3 +65,3 @@ const logMessage = { | ||
} | ||
fatal(message, code = LogCode_1.default.GENERAL_FATAL, object = {}, callback = () => { }) { | ||
fatal(message, code = LogCode_1.LogCode.GENERAL_FATAL, object = {}, callback = () => { }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -77,3 +79,3 @@ const logMessage = { | ||
} | ||
warn(message, code = LogCode_1.default.GENERAL_WARNING, object = {}) { | ||
warn(message, code = LogCode_1.LogCode.GENERAL_WARNING, object = {}) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -90,3 +92,3 @@ const logMessage = { | ||
} | ||
info(message, code = LogCode_1.default.GENERAL_INFO, object = {}) { | ||
info(message, code = LogCode_1.LogCode.GENERAL_INFO, object = {}) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -103,3 +105,3 @@ const logMessage = { | ||
} | ||
debug(message, code = LogCode_1.default.GENERAL_DEBUG, object = {}) { | ||
debug(message, code = LogCode_1.LogCode.GENERAL_DEBUG, object = {}) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -106,0 +108,0 @@ const logMessage = { |
{ | ||
"name": "ts-composite-logger", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"description": "Logger written in typescript. Includes a console channel by default. Allows to add other log channels by extending ILogChannel interface.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
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
25633
467