@compas/stdlib
Advanced tools
Comparing version 0.10.5 to 0.10.6
{ | ||
"name": "@compas/stdlib", | ||
"version": "0.10.5", | ||
"version": "0.10.6", | ||
"description": "All kinds of utility functions", | ||
@@ -5,0 +5,0 @@ "exports": { |
@@ -132,4 +132,10 @@ import { pino } from "pino"; | ||
info: (message) => { | ||
childLogger.info({ message }); | ||
if (!_compasSentryExport?.getActiveSpan?.()) { | ||
// Don't add breadcrumbs if we don't have a span. This prevents unmatched logs from showing up in a random span. | ||
return; | ||
} | ||
if (!addedContextAsBreadcrumb) { | ||
// @ts-expect-error | ||
_compasSentryExport.addBreadcrumb({ | ||
@@ -146,3 +152,2 @@ category: context.type, | ||
// @ts-expect-error | ||
_compasSentryExport.addBreadcrumb({ | ||
@@ -155,8 +160,12 @@ category: context.type, | ||
}); | ||
childLogger.info({ message }); | ||
}, | ||
error: (message) => { | ||
childLogger.error({ message }); | ||
if (!_compasSentryExport?.getActiveSpan?.()) { | ||
// Don't add breadcrumbs if we don't have a span. This prevents unmatched logs from showing up in a random span. | ||
return; | ||
} | ||
if (!addedContextAsBreadcrumb) { | ||
// @ts-expect-error | ||
_compasSentryExport.addBreadcrumb({ | ||
@@ -173,3 +182,2 @@ category: "log", | ||
// @ts-expect-error | ||
_compasSentryExport.addBreadcrumb({ | ||
@@ -182,4 +190,2 @@ category: "log", | ||
}); | ||
childLogger.error({ message }); | ||
}, | ||
@@ -186,0 +192,0 @@ }; |
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
75211
2476