@nextastic/logger
Advanced tools
Comparing version 1.0.0 to 2.0.0
@@ -1,2 +0,1 @@ | ||
import pino from 'pino'; | ||
export declare function getLogger(): Promise<pino.Logger<never, boolean>>; | ||
export declare const logger: import("pino").Logger<never, boolean>; |
@@ -6,23 +6,16 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getLogger = getLogger; | ||
exports.logger = void 0; | ||
const pino_1 = __importDefault(require("pino")); | ||
const config_1 = require("@nextastic/config"); | ||
let logger; | ||
async function getLogger() { | ||
if (logger) { | ||
return logger; | ||
} | ||
logger = (0, pino_1.default)({ | ||
level: (await config_1.config.get('app.logLevel')), | ||
transport: { | ||
target: 'pino-pretty', | ||
options: { | ||
colorize: true, | ||
ignore: 'pid,hostname', | ||
messageFormat: '{msg}', | ||
translateTime: false, | ||
}, | ||
exports.logger = (0, pino_1.default)({ | ||
level: config_1.config.app.logLevel, | ||
transport: { | ||
target: 'pino-pretty', | ||
options: { | ||
colorize: true, | ||
ignore: 'pid,hostname', | ||
messageFormat: '{msg}', | ||
translateTime: false, | ||
}, | ||
}); | ||
return logger; | ||
} | ||
}, | ||
}); |
{ | ||
"name": "@nextastic/logger", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Adds logging to your application.", | ||
@@ -28,3 +28,3 @@ "repository": { | ||
"pino-pretty": "^13.0.0", | ||
"@nextastic/config": "1.0.0" | ||
"@nextastic/config": "2.0.0" | ||
}, | ||
@@ -31,0 +31,0 @@ "scripts": { |
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
1408
21
+ Added@nextastic/config@2.0.0(transitive)
- Removed@ioredis/commands@1.2.0(transitive)
- Removed@nextastic/cache@0.1.0(transitive)
- Removed@nextastic/config@1.0.0(transitive)
- Removed@nextastic/redis@0.0.3(transitive)
- Removedcluster-key-slot@1.1.2(transitive)
- Removeddebug@4.3.7(transitive)
- Removeddenque@2.1.0(transitive)
- Removedioredis@5.4.1(transitive)
- Removedlodash.defaults@4.2.0(transitive)
- Removedlodash.isarguments@3.1.0(transitive)
- Removedms@2.1.3(transitive)
- Removedredis-errors@1.2.0(transitive)
- Removedredis-parser@3.0.0(transitive)
- Removedstandard-as-callback@2.1.0(transitive)
Updated@nextastic/config@2.0.0