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

@contember/logger

Package Overview
Dependencies
Maintainers
5
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contember/logger - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0-alpha.2

dist/src/handlers/TestLoggerHandler.d.ts

3

dist/src/handlers/FingerCrossedLoggerHandler.js

@@ -40,2 +40,5 @@ "use strict";

}
else if (this.buffer.length === 0 && logEntryLevel >= this.options.logAlwaysLevel.value) {
this.inner.handle(logEntry);
}
else {

@@ -42,0 +45,0 @@ this.buffer.push(logEntry);

10

dist/src/impl.js

@@ -54,10 +54,12 @@ "use strict";

log(level, errorOrMessage, { error: errorAttr, message: messageAttr, ...attributes } = {}) {
var _a;
const error = typeof errorOrMessage !== 'string' ? errorOrMessage : errorAttr;
const message = typeof errorOrMessage === 'string'
const errorMessage = typeof error === 'object' && error !== null && typeof error.message === 'string'
? error.message : undefined;
const passedMessage = typeof errorOrMessage === 'string'
? errorOrMessage
: (typeof messageAttr === 'string')
? messageAttr
: typeof error === 'object' && error !== null && typeof error.message === 'string'
? error.message
: 'unknown error';
: undefined;
const message = errorMessage && passedMessage ? `${passedMessage}: ${errorMessage}` : ((_a = passedMessage !== null && passedMessage !== void 0 ? passedMessage : errorMessage) !== null && _a !== void 0 ? _a : 'undefined message');
const now = new Date();

@@ -64,0 +66,0 @@ let formatted;

@@ -10,2 +10,3 @@ export { createLogger } from './impl';

export * from './handlers/NullLoggerHandler';
export * from './handlers/TestLoggerHandler';
//# sourceMappingURL=index.d.ts.map

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

__exportStar(require("./handlers/NullLoggerHandler"), exports);
__exportStar(require("./handlers/TestLoggerHandler"), exports);
//# sourceMappingURL=index.js.map
{
"name": "@contember/logger",
"version": "1.2.1",
"version": "1.3.0-alpha.2",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "main": "dist/src/index.js",

@@ -56,2 +56,5 @@ import { LogEntry, LoggerHandler, LoggerHandlerFactory, LogLevel } from '../types'

} else if (this.buffer.length === 0 && logEntryLevel >= this.options.logAlwaysLevel.value) {
this.inner.handle(logEntry)
} else {

@@ -58,0 +61,0 @@ this.buffer.push(logEntry)

@@ -87,10 +87,13 @@ import {

const error: unknown | undefined = typeof errorOrMessage !== 'string' ? errorOrMessage : errorAttr
const message: string = typeof errorOrMessage === 'string'
const errorMessage = typeof error === 'object' && error !== null && typeof (error as any).message === 'string'
? (error as any).message : undefined
const passedMessage = typeof errorOrMessage === 'string'
? errorOrMessage
: (typeof messageAttr === 'string')
? messageAttr
: typeof error === 'object' && error !== null && typeof (error as any).message === 'string'
? (error as any).message
: 'unknown error'
: undefined
const message = errorMessage && passedMessage ? `${passedMessage}: ${errorMessage}` : (passedMessage ?? errorMessage ?? 'undefined message')
const now = new Date()

@@ -97,0 +100,0 @@ let formatted: LogEntryFormatted

@@ -10,1 +10,2 @@ export { createLogger } from './impl'

export * from './handlers/NullLoggerHandler'
export * from './handlers/TestLoggerHandler'

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