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

@logtail/core

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@logtail/core - npm Package Compare versions

Comparing version 0.4.14 to 0.4.15

1

dist/cjs/base.d.ts

@@ -24,3 +24,2 @@ import { ILogLevel, ILogtailLog, ILogtailOptions, Context, Middleware, Sync } from "@logtail/types";

constructor(sourceToken: string, options?: Partial<ILogtailOptions>);
private getContextFromError;
/**

@@ -27,0 +26,0 @@ * Flush batched logs to Logtail

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

const tools_1 = require("@logtail/tools");
const serialize_error_1 = require("serialize-error");
// Set default options for Logtail

@@ -84,8 +85,2 @@ const defaultOptions = {

}
/* PRIVATE METHODS */
getContextFromError(e) {
return {
stack: e.stack,
};
}
/* PUBLIC METHODS */

@@ -165,5 +160,3 @@ /**

if (message instanceof Error) {
log = Object.assign(Object.assign(Object.assign({}, log), this.getContextFromError(message)), {
// Add error message
message: message.message });
log = Object.assign(Object.assign({}, log), (0, serialize_error_1.serializeError)(message));
}

@@ -170,0 +163,0 @@ else {

@@ -24,3 +24,2 @@ import { ILogLevel, ILogtailLog, ILogtailOptions, Context, Middleware, Sync } from "@logtail/types";

constructor(sourceToken: string, options?: Partial<ILogtailOptions>);
private getContextFromError;
/**

@@ -27,0 +26,0 @@ * Flush batched logs to Logtail

import { LogLevel, } from "@logtail/types";
import { makeBatch, makeBurstProtection, makeThrottle } from "@logtail/tools";
import { serializeError } from "serialize-error";
// Set default options for Logtail

@@ -81,8 +82,2 @@ const defaultOptions = {

}
/* PRIVATE METHODS */
getContextFromError(e) {
return {
stack: e.stack,
};
}
/* PUBLIC METHODS */

@@ -162,5 +157,3 @@ /**

if (message instanceof Error) {
log = Object.assign(Object.assign(Object.assign({}, log), this.getContextFromError(message)), {
// Add error message
message: message.message });
log = Object.assign(Object.assign({}, log), serializeError(message));
}

@@ -167,0 +160,0 @@ else {

7

package.json
{
"name": "@logtail/core",
"version": "0.4.14",
"version": "0.4.15",
"description": "Better Stack logging core (formerly Logtail)",

@@ -45,5 +45,6 @@ "keywords": [

"@logtail/tools": "^0.4.14",
"@logtail/types": "^0.4.14"
"@logtail/types": "^0.4.14",
"serialize-error": "^8.1.0"
},
"gitHead": "0eaf456a9bf7c2b0c62f0b1dd5015d8491865fff"
"gitHead": "22d60af549eaf1fe1734fce81ea8d6d801b6f8d9"
}

@@ -11,2 +11,3 @@ import {

import { makeBatch, makeBurstProtection, makeThrottle } from "@logtail/tools";
import { serializeError } from "serialize-error";

@@ -150,9 +151,2 @@ // Types

/* PRIVATE METHODS */
private getContextFromError(e: Error) {
return {
stack: e.stack,
};
}
/* PUBLIC METHODS */

@@ -255,7 +249,4 @@

// Add stack trace
...this.getContextFromError(message),
// Add error message
message: message.message,
// Serialize the error and add to log
...serializeError(message),
};

@@ -262,0 +253,0 @@ } else {

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