winston-sentry-javascript-node
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -21,6 +21,7 @@ import { LogEntry } from 'winston'; | ||
export declare type Log = LogEntry & Tag & UserInfo & Extra; | ||
export declare type SentryTransportOption = TransportStreamOptions & SentryOptions; | ||
export declare class SentryTransport extends Transport { | ||
constructor(opts: TransportStreamOptions & SentryOptions); | ||
constructor(opts: SentryTransportOption); | ||
log(info: Log, next: () => void): void; | ||
private static getLevel; | ||
} |
@@ -60,2 +60,9 @@ "use strict"; | ||
else if (info.exception && this.handleExceptions) { | ||
scope.setExtras({ | ||
stack, | ||
message, | ||
process: info.process, | ||
os: info.os, | ||
trace: info.trace, | ||
}); | ||
Sentry.captureException(error); | ||
@@ -62,0 +69,0 @@ } |
{ | ||
"name": "winston-sentry-javascript-node", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Sentry transport for the winson logger that using official Sentry SDK for javascript instead of the old Raven.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -27,4 +27,6 @@ import { LogEntry } from 'winston'; | ||
export type SentryTransportOption = TransportStreamOptions & SentryOptions; | ||
export class SentryTransport extends Transport { | ||
public constructor(opts: TransportStreamOptions & SentryOptions) { | ||
public constructor(opts: SentryTransportOption) { | ||
const { sentry, ...rest } = opts; | ||
@@ -78,2 +80,10 @@ super(rest); | ||
} else if (info.exception && this.handleExceptions) { | ||
scope.setExtras({ | ||
stack, | ||
message, | ||
process: info.process, | ||
os: info.os, | ||
trace: info.trace, | ||
}); | ||
Sentry.captureException(error); | ||
@@ -80,0 +90,0 @@ } else { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15048
287