@zodash/logger
Advanced tools
Comparing version 0.2.15 to 0.2.16
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.2.16](https://github.com/zcorky/zodash/compare/@zodash/logger@0.2.15...@zodash/logger@0.2.16) (2021-05-03) | ||
**Note:** Version bump only for package @zodash/logger | ||
## [0.2.15](https://github.com/zcorky/zodash/compare/@zodash/logger@0.2.14...@zodash/logger@0.2.15) (2021-03-25) | ||
@@ -8,0 +16,0 @@ |
"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()); | ||
}); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -69,15 +60,15 @@ exports.getLogger = exports.Logger = exports.LogLevel = void 0; | ||
useDefaulEngine() { | ||
return (ctx, next) => __awaiter(this, void 0, void 0, function* () { | ||
return async (ctx, next) => { | ||
ctx.input.engine = console; | ||
yield next(); | ||
}); | ||
await next(); | ||
}; | ||
} | ||
useDateTime() { | ||
return (ctx, next) => __awaiter(this, void 0, void 0, function* () { | ||
return async (ctx, next) => { | ||
ctx.input.datetime = moment_1.moment(); | ||
yield next(); | ||
}); | ||
await next(); | ||
}; | ||
} | ||
useDisable() { | ||
return (ctx, next) => __awaiter(this, void 0, void 0, function* () { | ||
return async (_ctx, next) => { | ||
const enable = !Logger._disableFn ? true : !Logger._disableFn(); | ||
@@ -87,7 +78,7 @@ if (!enable) { | ||
} | ||
yield next(); | ||
}); | ||
await next(); | ||
}; | ||
} | ||
handle() { | ||
return (ctx) => __awaiter(this, void 0, void 0, function* () { | ||
return async (ctx) => { | ||
const { input } = ctx; | ||
@@ -138,3 +129,3 @@ if (this.options.console === false) { | ||
} | ||
}); | ||
}; | ||
} | ||
@@ -141,0 +132,0 @@ log(message, ...args) { |
{ | ||
"name": "@zodash/logger", | ||
"version": "0.2.15", | ||
"version": "0.2.16", | ||
"description": "simple logger model", | ||
@@ -71,3 +71,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "bd85904bdf3094ed8d65df0fa57c695c74d4dc87" | ||
"gitHead": "904ffa5f78d9aae6d39c9946cf5c36c7a4bcb60b" | ||
} |
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
18411
247