MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / captureLog

Function captureLog

packages/core/src/logs/public-api.ts:15–23  ·  view source on GitHub ↗

* 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. * @param scope - The scope to capture the log with. * @param severity

(
  level: LogSeverityLevel,
  message: ParameterizedString,
  attributes?: Log['attributes'],
  scope?: Scope,
  severityNumber?: Log['severityNumber'],
)

Source from the content-addressed store, hash-verified

13 * @param severityNumber - The severity number of the log.
14 */
15function captureLog(
16 level: LogSeverityLevel,
17 message: ParameterizedString,
18 attributes?: Log['attributes'],
19 scope?: Scope,
20 severityNumber?: Log['severityNumber'],
21): void {
22 _INTERNAL_captureLog({ level, message, attributes, severityNumber }, scope);
23}
24
25/**
26 * Additional metadata to capture the log with.

Callers 6

traceFunction · 0.70
debugFunction · 0.70
infoFunction · 0.70
warnFunction · 0.70
errorFunction · 0.70
fatalFunction · 0.70

Calls 1

_INTERNAL_captureLogFunction · 0.90

Tested by

no test coverage detected