Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pager/logger

Package Overview
Dependencies
Maintainers
51
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pager/logger - npm Package Compare versions

Comparing version 7.2.0 to 7.3.0

1

lib/logger.d.ts

@@ -10,4 +10,5 @@ import Pino from 'pino';

export declare const errorSerializer: Pino.SerializerFn;
export declare const pinoLabelToLogSeverity: (label: string) => string;
export type Logger = Pino.Logger;
export declare const createLogger: (options?: CreateLoggerOptions, destination?: Pino.DestinationStream) => Logger;
export declare const logger: Logger;

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.logger = exports.createLogger = exports.errorSerializer = void 0;
exports.logger = exports.createLogger = exports.pinoLabelToLogSeverity = exports.errorSerializer = void 0;
const pino_1 = __importDefault(require("pino"));

@@ -26,2 +26,15 @@ const pino_std_serializers_1 = require("pino-std-serializers");

exports.errorSerializer = errorSerializer;
// Maps the pino label to GCP's LogSeverity enum: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#logseverity
const pinoLabelToLogSeverity = (label) => {
switch (label) {
case 'trace': return 'DEBUG';
case 'debug': return 'DEBUG';
case 'info': return 'INFO';
case 'warn': return 'WARNING';
case 'error': return 'ERROR';
case 'fatal': return 'CRITICAL';
default: return 'DEFAULT';
}
};
exports.pinoLabelToLogSeverity = pinoLabelToLogSeverity;
const defaults = {

@@ -76,3 +89,8 @@ /* $lab:coverage:off$ */

},
timestamp: pino_1.default.stdTimeFunctions.isoTime
timestamp: pino_1.default.stdTimeFunctions.isoTime,
formatters: {
level: (label) => ({
severity: (0, exports.pinoLabelToLogSeverity)(label)
})
}
};

@@ -79,0 +97,0 @@ const handleRejections = (logger) => {

2

package.json
{
"name": "@pager/logger",
"version": "7.2.0",
"version": "7.3.0",
"description": "Logging library",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc