@nextastic/logger
Advanced tools
Comparing version 0.1.0 to 1.0.0
@@ -1,1 +0,2 @@ | ||
export declare const logger: import("pino").Logger<never, boolean>; | ||
import pino from 'pino'; | ||
export declare function getLogger(): Promise<pino.Logger<never, boolean>>; |
@@ -6,15 +6,23 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.logger = void 0; | ||
exports.getLogger = getLogger; | ||
const pino_1 = __importDefault(require("pino")); | ||
exports.logger = (0, pino_1.default)({ | ||
level: process.env.NEXT_PUBLIC_LOG_LEVEL, | ||
transport: { | ||
target: 'pino-pretty', | ||
options: { | ||
colorize: true, | ||
ignore: 'pid,hostname', | ||
messageFormat: '{msg}', | ||
translateTime: false | ||
} | ||
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, | ||
}, | ||
}, | ||
}); | ||
return logger; | ||
} |
{ | ||
"name": "@nextastic/logger", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"description": "Adds logging to your application.", | ||
@@ -27,3 +27,4 @@ "repository": { | ||
"pino": "^9.5.0", | ||
"pino-pretty": "^13.0.0" | ||
"pino-pretty": "^13.0.0", | ||
"@nextastic/config": "1.0.0" | ||
}, | ||
@@ -30,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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1610
29
1
0
3
+ Added@nextastic/config@1.0.0
+ Added@ioredis/commands@1.2.0(transitive)
+ Added@nextastic/cache@0.1.0(transitive)
+ Added@nextastic/config@1.0.0(transitive)
+ Added@nextastic/redis@0.0.3(transitive)
+ Addedcluster-key-slot@1.1.2(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addeddenque@2.1.0(transitive)
+ Addedioredis@5.4.1(transitive)
+ Addedlodash.defaults@4.2.0(transitive)
+ Addedlodash.isarguments@3.1.0(transitive)
+ Addedms@2.1.3(transitive)
+ Addedredis-errors@1.2.0(transitive)
+ Addedredis-parser@3.0.0(transitive)
+ Addedstandard-as-callback@2.1.0(transitive)