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

@seek/logger

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@seek/logger - npm Package Compare versions

Comparing version 6.0.0 to 6.1.0

5

lib-commonjs/formatters/index.js

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

const createFormatters = (opts) => {
const trim = (0, dtrim_1.trimmer)({ depth: opts.maxObjectDepth ?? 4 });
const trim = (0, dtrim_1.trimmer)({
depth: opts.maxObjectDepth ?? 4,
retain: new Set(Object.keys(opts.serializers ?? {})),
});
return {

@@ -9,0 +12,0 @@ log: (input) => trim(input),

2

lib-commonjs/index.js

@@ -49,3 +49,2 @@ "use strict";

})) => {
const formatters = (0, formatters_1.createFormatters)(opts);
opts.redact = redact.addDefaultRedactPathStrings(opts.redact);

@@ -56,2 +55,3 @@ opts.serializers = {

};
const formatters = (0, formatters_1.createFormatters)(opts);
opts.base = {

@@ -58,0 +58,0 @@ ...base_1.default,

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const pino_std_serializers_1 = __importDefault(require("pino-std-serializers"));
const pino_std_serializers_1 = require("pino-std-serializers");
const getHeaders = ({ _header, header, headers }) => _header || header || headers;

@@ -29,3 +26,4 @@ const getStatus = ({ statusCode, status }) => statusCode || status;

exports.default = {
...pino_std_serializers_1.default,
err: pino_std_serializers_1.err,
errWithCause: pino_std_serializers_1.errWithCause,
res,

@@ -32,0 +30,0 @@ req,

import { trimmer } from 'dtrim';
export const createFormatters = (opts) => {
const trim = trimmer({ depth: opts.maxObjectDepth ?? 4 });
const trim = trimmer({
depth: opts.maxObjectDepth ?? 4,
retain: new Set(Object.keys(opts.serializers ?? {})),
});
return {

@@ -5,0 +8,0 @@ log: (input) => trim(input),

@@ -20,3 +20,2 @@ import pino from 'pino';

})) => {
const formatters = createFormatters(opts);
opts.redact = redact.addDefaultRedactPathStrings(opts.redact);

@@ -27,2 +26,3 @@ opts.serializers = {

};
const formatters = createFormatters(opts);
opts.base = {

@@ -29,0 +29,0 @@ ...base,

@@ -1,2 +0,2 @@

import stdSerializers from 'pino-std-serializers';
import { err, errWithCause } from 'pino-std-serializers';
const getHeaders = ({ _header, header, headers }) => _header || header || headers;

@@ -24,3 +24,4 @@ const getStatus = ({ statusCode, status }) => statusCode || status;

export default {
...stdSerializers,
err,
errWithCause,
res,

@@ -27,0 +28,0 @@ req,

@@ -1,2 +0,2 @@

import pino from 'pino';
import pino, { LoggerOptions } from 'pino';
export interface FormatterOptions {

@@ -12,2 +12,2 @@ /**

}
export declare const createFormatters: (opts: FormatterOptions) => pino.LoggerOptions['formatters'];
export declare const createFormatters: (opts: FormatterOptions & Pick<LoggerOptions, 'serializers'>) => pino.LoggerOptions['formatters'];

@@ -1,3 +0,2 @@

/// <reference types="node" />
import stdSerializers from 'pino-std-serializers';
import { err, errWithCause } from 'pino-std-serializers';
interface Socket {

@@ -18,2 +17,4 @@ remoteAddress?: string;

declare const _default: {
err: typeof err;
errWithCause: typeof errWithCause;
res: (response: Response) => Response;

@@ -27,13 +28,3 @@ req: (request: Request) => Request | {

};
err(err: Error): stdSerializers.SerializedError;
mapHttpRequest(req: import("http").IncomingMessage): {
req: stdSerializers.SerializedRequest;
};
mapHttpResponse(res: import("http").ServerResponse<import("http").IncomingMessage>): {
res: stdSerializers.SerializedResponse;
};
wrapErrorSerializer(customSerializer: stdSerializers.CustomErrorSerializer): (err: Error) => Record<string, any>;
wrapRequestSerializer(customSerializer: stdSerializers.CustomRequestSerializer): (req: import("http").IncomingMessage) => Record<string, any>;
wrapResponseSerializer(customSerializer: stdSerializers.CustomResponseSerializer): (res: import("http").ServerResponse<import("http").IncomingMessage>) => Record<string, any>;
};
export default _default;
{
"name": "@seek/logger",
"version": "6.0.0",
"version": "6.1.0",
"private": false,

@@ -39,5 +39,5 @@ "description": "Standardized logging",

"dependencies": {
"dtrim": "^1.9.0",
"dtrim": "^1.11.0",
"pino": "^8.0.0",
"pino-std-serializers": "^6.0.0"
"pino-std-serializers": "^6.2.0"
},

@@ -44,0 +44,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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