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

@dxos/log

Package Overview
Dependencies
Maintainers
13
Versions
2307
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dxos/log - npm Package Compare versions

Comparing version 0.1.23 to 0.1.24-next.6b1f434

2

dist/lib/browser/meta.json

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

{"inputs":{"packages/common/log/src/config.ts":{"bytes":3477,"imports":[]},"packages/common/log/src/context.ts":{"bytes":3555,"imports":[]},"packages/common/log/src/platform/browser/index.ts":{"bytes":1225,"imports":[]},"packages/common/log/src/platform/index.ts":{"bytes":368,"imports":[{"path":"packages/common/log/src/platform/browser/index.ts","kind":"import-statement","original":"./node"}]},"packages/common/log/src/scope.ts":{"bytes":3793,"imports":[]},"packages/common/log/src/processors/console-processor.ts":{"bytes":13271,"imports":[{"path":"chalk","kind":"import-statement","external":true},{"path":"lodash.pickby","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"../config"},{"path":"packages/common/log/src/context.ts","kind":"import-statement","original":"../context"},{"path":"packages/common/log/src/scope.ts","kind":"import-statement","original":"../scope"}]},"packages/common/log/src/processors/debug-processor.ts":{"bytes":986,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true}]},"packages/common/log/src/processors/browser-processor.ts":{"bytes":13069,"imports":[{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"../config"},{"path":"packages/common/log/src/context.ts","kind":"import-statement","original":"../context"}]},"packages/common/log/src/processors/index.ts":{"bytes":617,"imports":[{"path":"packages/common/log/src/processors/console-processor.ts","kind":"import-statement","original":"./console-processor"},{"path":"packages/common/log/src/processors/debug-processor.ts","kind":"import-statement","original":"./debug-processor"},{"path":"packages/common/log/src/processors/browser-processor.ts","kind":"import-statement","original":"./browser-processor"}]},"packages/common/log/src/options.ts":{"bytes":7216,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/common/log/src/platform/index.ts","kind":"import-statement","original":"./platform"},{"path":"packages/common/log/src/processors/index.ts","kind":"import-statement","original":"./processors"}]},"packages/common/log/src/log.ts":{"bytes":6323,"imports":[{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/common/log/src/options.ts","kind":"import-statement","original":"./options"}]},"packages/common/log/src/experimental/ownership.ts":{"bytes":9152,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true}]},"packages/common/log/src/index.ts":{"bytes":948,"imports":[{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/common/log/src/context.ts","kind":"import-statement","original":"./context"},{"path":"packages/common/log/src/log.ts","kind":"import-statement","original":"./log"},{"path":"packages/common/log/src/processors/index.ts","kind":"import-statement","original":"./processors"},{"path":"packages/common/log/src/scope.ts","kind":"import-statement","original":"./scope"},{"path":"packages/common/log/src/experimental/ownership.ts","kind":"import-statement","original":"./experimental/ownership"}]}},"outputs":{"packages/common/log/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":31160},"packages/common/log/dist/lib/browser/index.mjs":{"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"chalk","kind":"import-statement","external":true},{"path":"lodash.pickby","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true}],"exports":["BROWSER_PROCESSOR","CONSOLE_PROCESSOR","DEBUG_PROCESSOR","DEFAULT_FORMATTER","LogLevel","LogProcessorType","SHORT_FORMATTER","gatherLogInfoFromScope","getCurrentOwnershipScope","levels","log","logInfo","shortLevelName","shouldLog","truncate"],"entryPoint":"packages/common/log/src/index.ts","inputs":{"packages/common/log/src/config.ts":{"bytesInOutput":720},"packages/common/log/src/index.ts":{"bytesInOutput":0},"packages/common/log/src/context.ts":{"bytesInOutput":325},"packages/common/log/src/options.ts":{"bytesInOutput":1603},"packages/common/log/src/platform/browser/index.ts":{"bytesInOutput":140},"packages/common/log/src/platform/index.ts":{"bytesInOutput":0},"packages/common/log/src/processors/console-processor.ts":{"bytesInOutput":2697},"packages/common/log/src/scope.ts":{"bytesInOutput":662},"packages/common/log/src/processors/index.ts":{"bytesInOutput":0},"packages/common/log/src/processors/debug-processor.ts":{"bytesInOutput":156},"packages/common/log/src/processors/browser-processor.ts":{"bytesInOutput":2718},"packages/common/log/src/log.ts":{"bytesInOutput":1200},"packages/common/log/src/experimental/ownership.ts":{"bytesInOutput":826}},"bytes":11923}}}
{"inputs":{"packages/common/log/src/config.ts":{"bytes":3477,"imports":[]},"packages/common/log/src/scope.ts":{"bytes":3793,"imports":[]},"packages/common/log/src/context.ts":{"bytes":6783,"imports":[{"path":"packages/common/log/src/scope.ts","kind":"import-statement","original":"./scope"}]},"packages/common/log/src/platform/browser/index.ts":{"bytes":1225,"imports":[]},"packages/common/log/src/platform/index.ts":{"bytes":368,"imports":[{"path":"packages/common/log/src/platform/browser/index.ts","kind":"import-statement","original":"./node"}]},"packages/common/log/src/processors/console-processor.ts":{"bytes":10898,"imports":[{"path":"chalk","kind":"import-statement","external":true},{"path":"lodash.pickby","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"../config"},{"path":"packages/common/log/src/context.ts","kind":"import-statement","original":"../context"}]},"packages/common/log/src/processors/debug-processor.ts":{"bytes":986,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true}]},"packages/common/log/src/processors/browser-processor.ts":{"bytes":12988,"imports":[{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"../config"},{"path":"packages/common/log/src/context.ts","kind":"import-statement","original":"../context"}]},"packages/common/log/src/processors/index.ts":{"bytes":617,"imports":[{"path":"packages/common/log/src/processors/console-processor.ts","kind":"import-statement","original":"./console-processor"},{"path":"packages/common/log/src/processors/debug-processor.ts","kind":"import-statement","original":"./debug-processor"},{"path":"packages/common/log/src/processors/browser-processor.ts","kind":"import-statement","original":"./browser-processor"}]},"packages/common/log/src/options.ts":{"bytes":7216,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/common/log/src/platform/index.ts","kind":"import-statement","original":"./platform"},{"path":"packages/common/log/src/processors/index.ts","kind":"import-statement","original":"./processors"}]},"packages/common/log/src/log.ts":{"bytes":6323,"imports":[{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/common/log/src/options.ts","kind":"import-statement","original":"./options"}]},"packages/common/log/src/experimental/ownership.ts":{"bytes":9152,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true}]},"packages/common/log/src/index.ts":{"bytes":948,"imports":[{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/common/log/src/context.ts","kind":"import-statement","original":"./context"},{"path":"packages/common/log/src/log.ts","kind":"import-statement","original":"./log"},{"path":"packages/common/log/src/processors/index.ts","kind":"import-statement","original":"./processors"},{"path":"packages/common/log/src/scope.ts","kind":"import-statement","original":"./scope"},{"path":"packages/common/log/src/experimental/ownership.ts","kind":"import-statement","original":"./experimental/ownership"}]}},"outputs":{"packages/common/log/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":31614},"packages/common/log/dist/lib/browser/index.mjs":{"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"chalk","kind":"import-statement","external":true},{"path":"lodash.pickby","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true}],"exports":["BROWSER_PROCESSOR","CONSOLE_PROCESSOR","DEBUG_PROCESSOR","DEFAULT_FORMATTER","LogLevel","LogProcessorType","SHORT_FORMATTER","gatherLogInfoFromScope","getContextFromEntry","getCurrentOwnershipScope","levels","log","logInfo","shortLevelName","shouldLog","truncate"],"entryPoint":"packages/common/log/src/index.ts","inputs":{"packages/common/log/src/config.ts":{"bytesInOutput":720},"packages/common/log/src/index.ts":{"bytesInOutput":0},"packages/common/log/src/scope.ts":{"bytesInOutput":662},"packages/common/log/src/context.ts":{"bytesInOutput":1034},"packages/common/log/src/options.ts":{"bytesInOutput":1603},"packages/common/log/src/platform/browser/index.ts":{"bytesInOutput":140},"packages/common/log/src/platform/index.ts":{"bytesInOutput":0},"packages/common/log/src/processors/console-processor.ts":{"bytesInOutput":2235},"packages/common/log/src/processors/index.ts":{"bytesInOutput":0},"packages/common/log/src/processors/debug-processor.ts":{"bytesInOutput":156},"packages/common/log/src/processors/browser-processor.ts":{"bytesInOutput":2704},"packages/common/log/src/log.ts":{"bytesInOutput":1200},"packages/common/log/src/experimental/ownership.ts":{"bytesInOutput":826}},"bytes":12119}}}

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

{"inputs":{"packages/common/log/src/config.ts":{"bytes":3477,"imports":[]},"packages/common/log/src/context.ts":{"bytes":3555,"imports":[]},"packages/common/log/src/platform/node/index.ts":{"bytes":2356,"imports":[{"path":"fs","kind":"import-statement","external":true},{"path":"js-yaml","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true}]},"packages/common/log/src/platform/index.ts":{"bytes":368,"imports":[{"path":"packages/common/log/src/platform/node/index.ts","kind":"import-statement","original":"./node"}]},"packages/common/log/src/scope.ts":{"bytes":3793,"imports":[]},"packages/common/log/src/processors/console-processor.ts":{"bytes":13271,"imports":[{"path":"chalk","kind":"import-statement","external":true},{"path":"lodash.pickby","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"../config"},{"path":"packages/common/log/src/context.ts","kind":"import-statement","original":"../context"},{"path":"packages/common/log/src/scope.ts","kind":"import-statement","original":"../scope"}]},"packages/common/log/src/processors/debug-processor.ts":{"bytes":986,"imports":[{"path":"node:util","kind":"import-statement","external":true}]},"packages/common/log/src/processors/browser-processor.ts":{"bytes":13069,"imports":[{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"../config"},{"path":"packages/common/log/src/context.ts","kind":"import-statement","original":"../context"}]},"packages/common/log/src/processors/index.ts":{"bytes":617,"imports":[{"path":"packages/common/log/src/processors/console-processor.ts","kind":"import-statement","original":"./console-processor"},{"path":"packages/common/log/src/processors/debug-processor.ts","kind":"import-statement","original":"./debug-processor"},{"path":"packages/common/log/src/processors/browser-processor.ts","kind":"import-statement","original":"./browser-processor"}]},"packages/common/log/src/options.ts":{"bytes":7216,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/common/log/src/platform/index.ts","kind":"import-statement","original":"./platform"},{"path":"packages/common/log/src/processors/index.ts","kind":"import-statement","original":"./processors"}]},"packages/common/log/src/log.ts":{"bytes":6323,"imports":[{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/common/log/src/options.ts","kind":"import-statement","original":"./options"}]},"packages/common/log/src/experimental/ownership.ts":{"bytes":9152,"imports":[{"path":"node:util","kind":"import-statement","external":true}]},"packages/common/log/src/index.ts":{"bytes":948,"imports":[{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/common/log/src/context.ts","kind":"import-statement","original":"./context"},{"path":"packages/common/log/src/log.ts","kind":"import-statement","original":"./log"},{"path":"packages/common/log/src/processors/index.ts","kind":"import-statement","original":"./processors"},{"path":"packages/common/log/src/scope.ts","kind":"import-statement","original":"./scope"},{"path":"packages/common/log/src/experimental/ownership.ts","kind":"import-statement","original":"./experimental/ownership"}]}},"outputs":{"packages/common/log/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":32112},"packages/common/log/dist/lib/node/index.cjs":{"imports":[{"path":"lodash.defaultsdeep","kind":"require-call","external":true},{"path":"fs","kind":"require-call","external":true},{"path":"js-yaml","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"chalk","kind":"require-call","external":true},{"path":"lodash.pickby","kind":"require-call","external":true},{"path":"node:util","kind":"require-call","external":true},{"path":"node:util","kind":"require-call","external":true},{"path":"node:util","kind":"require-call","external":true}],"exports":[],"entryPoint":"packages/common/log/src/index.ts","inputs":{"packages/common/log/src/index.ts":{"bytesInOutput":669},"packages/common/log/src/config.ts":{"bytesInOutput":720},"packages/common/log/src/context.ts":{"bytesInOutput":329},"packages/common/log/src/options.ts":{"bytesInOutput":1647},"packages/common/log/src/platform/node/index.ts":{"bytesInOutput":542},"packages/common/log/src/platform/index.ts":{"bytesInOutput":0},"packages/common/log/src/processors/console-processor.ts":{"bytesInOutput":2874},"packages/common/log/src/scope.ts":{"bytesInOutput":662},"packages/common/log/src/processors/index.ts":{"bytesInOutput":0},"packages/common/log/src/processors/debug-processor.ts":{"bytesInOutput":165},"packages/common/log/src/processors/browser-processor.ts":{"bytesInOutput":2721},"packages/common/log/src/log.ts":{"bytesInOutput":1200},"packages/common/log/src/experimental/ownership.ts":{"bytesInOutput":830}},"bytes":14745}}}
{"inputs":{"packages/common/log/src/config.ts":{"bytes":3477,"imports":[]},"packages/common/log/src/scope.ts":{"bytes":3793,"imports":[]},"packages/common/log/src/context.ts":{"bytes":6783,"imports":[{"path":"packages/common/log/src/scope.ts","kind":"import-statement","original":"./scope"}]},"packages/common/log/src/platform/node/index.ts":{"bytes":2356,"imports":[{"path":"fs","kind":"import-statement","external":true},{"path":"js-yaml","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true}]},"packages/common/log/src/platform/index.ts":{"bytes":368,"imports":[{"path":"packages/common/log/src/platform/node/index.ts","kind":"import-statement","original":"./node"}]},"packages/common/log/src/processors/console-processor.ts":{"bytes":10898,"imports":[{"path":"chalk","kind":"import-statement","external":true},{"path":"lodash.pickby","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"../config"},{"path":"packages/common/log/src/context.ts","kind":"import-statement","original":"../context"}]},"packages/common/log/src/processors/debug-processor.ts":{"bytes":986,"imports":[{"path":"node:util","kind":"import-statement","external":true}]},"packages/common/log/src/processors/browser-processor.ts":{"bytes":12988,"imports":[{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"../config"},{"path":"packages/common/log/src/context.ts","kind":"import-statement","original":"../context"}]},"packages/common/log/src/processors/index.ts":{"bytes":617,"imports":[{"path":"packages/common/log/src/processors/console-processor.ts","kind":"import-statement","original":"./console-processor"},{"path":"packages/common/log/src/processors/debug-processor.ts","kind":"import-statement","original":"./debug-processor"},{"path":"packages/common/log/src/processors/browser-processor.ts","kind":"import-statement","original":"./browser-processor"}]},"packages/common/log/src/options.ts":{"bytes":7216,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/common/log/src/platform/index.ts","kind":"import-statement","original":"./platform"},{"path":"packages/common/log/src/processors/index.ts","kind":"import-statement","original":"./processors"}]},"packages/common/log/src/log.ts":{"bytes":6323,"imports":[{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/common/log/src/options.ts","kind":"import-statement","original":"./options"}]},"packages/common/log/src/experimental/ownership.ts":{"bytes":9152,"imports":[{"path":"node:util","kind":"import-statement","external":true}]},"packages/common/log/src/index.ts":{"bytes":948,"imports":[{"path":"packages/common/log/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/common/log/src/context.ts","kind":"import-statement","original":"./context"},{"path":"packages/common/log/src/log.ts","kind":"import-statement","original":"./log"},{"path":"packages/common/log/src/processors/index.ts","kind":"import-statement","original":"./processors"},{"path":"packages/common/log/src/scope.ts","kind":"import-statement","original":"./scope"},{"path":"packages/common/log/src/experimental/ownership.ts","kind":"import-statement","original":"./experimental/ownership"}]}},"outputs":{"packages/common/log/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":32566},"packages/common/log/dist/lib/node/index.cjs":{"imports":[{"path":"lodash.defaultsdeep","kind":"require-call","external":true},{"path":"fs","kind":"require-call","external":true},{"path":"js-yaml","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"chalk","kind":"require-call","external":true},{"path":"lodash.pickby","kind":"require-call","external":true},{"path":"node:util","kind":"require-call","external":true},{"path":"node:util","kind":"require-call","external":true},{"path":"node:util","kind":"require-call","external":true}],"exports":[],"entryPoint":"packages/common/log/src/index.ts","inputs":{"packages/common/log/src/index.ts":{"bytesInOutput":719},"packages/common/log/src/config.ts":{"bytesInOutput":720},"packages/common/log/src/scope.ts":{"bytesInOutput":662},"packages/common/log/src/context.ts":{"bytesInOutput":1038},"packages/common/log/src/options.ts":{"bytesInOutput":1647},"packages/common/log/src/platform/node/index.ts":{"bytesInOutput":542},"packages/common/log/src/platform/index.ts":{"bytesInOutput":0},"packages/common/log/src/processors/console-processor.ts":{"bytesInOutput":2390},"packages/common/log/src/processors/index.ts":{"bytesInOutput":0},"packages/common/log/src/processors/debug-processor.ts":{"bytesInOutput":165},"packages/common/log/src/processors/browser-processor.ts":{"bytesInOutput":2707},"packages/common/log/src/log.ts":{"bytesInOutput":1200},"packages/common/log/src/experimental/ownership.ts":{"bytesInOutput":830}},"bytes":14969}}}

@@ -42,2 +42,3 @@ import { LogConfig, LogLevel } from './config';

export declare const shouldLog: (config: LogConfig, level: LogLevel, path: string) => boolean;
export declare const getContextFromEntry: (entry: LogEntry) => Record<string, any> | undefined;
//# sourceMappingURL=context.d.ts.map
{
"name": "@dxos/log",
"version": "0.1.23",
"version": "0.1.24-next.6b1f434",
"description": "Logger",

@@ -24,3 +24,3 @@ "homepage": "https://dxos.org",

"lodash.pickby": "^4.6.0",
"@dxos/node-std": "0.1.23"
"@dxos/node-std": "0.1.24-next.6b1f434"
},

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

@@ -6,2 +6,3 @@ //

import { LogConfig, LogFilter, LogLevel } from './config';
import { gatherLogInfoFromScope } from './scope';

@@ -16,2 +17,3 @@ /**

*/
// TODO(burdon): Protobuf structure?
export interface LogMetadata {

@@ -67,1 +69,24 @@ file: string;

};
export const getContextFromEntry = (entry: LogEntry): Record<string, any> | undefined => {
let context;
if (entry.meta) {
const scopeInfo = gatherLogInfoFromScope(entry.meta.scope);
if (Object.keys(scopeInfo).length > 0) {
context = Object.assign(context ?? {}, scopeInfo);
}
}
if (entry.context) {
if (entry.context instanceof Error) {
// Additional context from Error.
const c = (entry.context as any).context;
// If ERROR then show stacktrace.
context = Object.assign(context ?? {}, { error: entry.context.stack, ...c });
} else if (typeof entry.context === 'object') {
context = Object.assign(context ?? {}, entry.context);
}
}
return context && Object.keys(context).length > 0 ? context : undefined;
};

@@ -6,3 +6,3 @@ //

import { LogLevel } from '../config';
import { LogProcessor, shouldLog } from '../context';
import { getContextFromEntry, LogProcessor, shouldLog } from '../context';

@@ -66,4 +66,6 @@ const getRelativeFilename = (filename: string) => {

args.push(entry.message);
if (entry.context && Object.keys(entry.context).length > 0) {
args.push(entry.context);
const context = getContextFromEntry(entry);
if (context) {
args.push(context);
}

@@ -108,4 +110,6 @@

args.push(entry.message);
if (entry.context && Object.keys(entry.context).length > 0) {
args.push(entry.context);
const context = getContextFromEntry(entry);
if (context) {
args.push(context);
}

@@ -112,0 +116,0 @@

@@ -10,4 +10,3 @@ //

import { LogConfig, LogLevel, shortLevelName } from '../config';
import { LogProcessor, shouldLog } from '../context';
import { gatherLogInfoFromScope } from '../scope';
import { getContextFromEntry, LogProcessor, shouldLog } from '../context';

@@ -79,3 +78,3 @@ const LEVEL_COLORS: Record<LogLevel, typeof chalk.ForegroundColor> = {

export const CONSOLE_PROCESSOR: LogProcessor = (config, entry) => {
let { level, message, context, meta, error } = entry;
const { level, message, meta, error } = entry;
if (!shouldLog(config, level, meta?.file ?? '')) {

@@ -90,22 +89,8 @@ return;

parts.line = meta.line;
// TODO(dmaretskyi): Add the same to the browser-processor.
const scopeInfo = gatherLogInfoFromScope(meta.scope);
if (Object.keys(scopeInfo).length > 0) {
context = Object.assign(context ?? {}, scopeInfo);
}
}
if (context instanceof Error) {
// Additional context from Error.
const c = (context as any).context;
// If ERROR then show stacktrace.
parts.context = inspect(level === LogLevel.ERROR ? context : { error: context?.stack ?? String(context), ...c }, {
colors: true
});
} else if (context && Object.keys(context).length > 0) {
const context = getContextFromEntry(entry);
if (context) {
// Remove undefined fields.
// https://nodejs.org/api/util.html#utilinspectobject-options
// Remove undefined fields.
// https://nodejs.org/api/util.html#utilinspectobject-options
parts.context = inspect(

@@ -112,0 +97,0 @@ pickBy(context, (value?: unknown) => value !== undefined),

@@ -21,3 +21,3 @@ //

run() {
log('run');
log.info('run');
}

@@ -24,0 +24,0 @@ }

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

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