Files
klz-cables.com/.pnpm-store/v10/files/b8/ce5de9f02b4dacb3a807591a6ecdea380cbe209a5dfa49856a16ec08d5a7764a8e4f9705e0ecc77dfa21c17b8ea118472591d15aae566769283a6e0e3e41ea
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

39 lines
1.6 KiB
Plaintext

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const util = require('node:util');
const core = require('@sentry/core');
/**
* Additional metadata to capture the log with.
*/
/**
* Capture a log with the given level.
*
* @param level - The level of the log.
* @param message - The message to log.
* @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.
*/
function captureLog(level, ...args) {
const [messageOrMessageTemplate, paramsOrAttributes, maybeAttributesOrMetadata, maybeMetadata] = args;
if (Array.isArray(paramsOrAttributes)) {
// type-casting here because from the type definitions we know that `maybeAttributesOrMetadata` is an attributes object (or undefined)
const attributes = { ...(maybeAttributesOrMetadata ) };
attributes['sentry.message.template'] = messageOrMessageTemplate;
paramsOrAttributes.forEach((param, index) => {
attributes[`sentry.message.parameter.${index}`] = param;
});
const message = util.format(messageOrMessageTemplate, ...paramsOrAttributes);
core._INTERNAL_captureLog({ level, message, attributes }, maybeMetadata?.scope);
} else {
core._INTERNAL_captureLog(
{ level, message: messageOrMessageTemplate, attributes: paramsOrAttributes },
// type-casting here because from the type definitions we know that `maybeAttributesOrMetadata` is a metadata object (or undefined)
(maybeAttributesOrMetadata )?.scope ?? maybeMetadata?.scope,
);
}
}
exports.captureLog = captureLog;
//# sourceMappingURL=capture.js.map