pino-sentry
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -27,2 +27,3 @@ #!/usr/bin/env node | ||
_b.trys.push([0, 2, , 3]); | ||
console.info('start'); | ||
return [4 /*yield*/, transport_1.createWriteStreamAsync({ | ||
@@ -29,0 +30,0 @@ dsn: dsn, |
@@ -118,3 +118,10 @@ "use strict"; | ||
var pumpAsync = pify_1.default(pump_1.default); | ||
return pumpAsync(process.stdin, split2_1.default(JSON.parse), sentryTransformer); | ||
return pumpAsync(process.stdin, split2_1.default(function (line) { | ||
try { | ||
return JSON.parse(line); | ||
} | ||
catch (e) { | ||
throw Error('logs should be in json format'); | ||
} | ||
}), sentryTransformer); | ||
} | ||
@@ -121,0 +128,0 @@ exports.createWriteStreamAsync = createWriteStreamAsync; |
{ | ||
"name": "pino-sentry", | ||
"description": "@sentry/node transport for pino logger", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"author": "Andrew Avdeev <andrewww.avdeev@gmail.com>", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -20,2 +20,3 @@ #!/usr/bin/env node | ||
try { | ||
console.info('start'); | ||
const writeStream = await createWriteStreamAsync({ | ||
@@ -22,0 +23,0 @@ dsn, |
@@ -126,3 +126,9 @@ import stream from 'stream'; | ||
const pumpAsync = pify(pump); | ||
return pumpAsync(process.stdin, split(JSON.parse), sentryTransformer); | ||
return pumpAsync(process.stdin, split((line) => { | ||
try { | ||
return JSON.parse(line); | ||
} catch(e) { | ||
throw Error('logs should be in json format'); | ||
} | ||
}), sentryTransformer); | ||
}; | ||
@@ -129,0 +135,0 @@ |
Sorry, the diff of this file is not supported yet
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
28717
356