Log Record

Defined under the namespace Scandit.Datacapture.Core

LogRecord
interface LogRecord

Added in version 8.7.0

One entry in the ScanditLogger buffer. Records are produced by the SDK; you receive them from ScanditLogger.getRecentLogs() and ScanditLogger.subscribe().

ts
ts: number

Added in version 8.7.0

When the record was produced, as milliseconds since the Unix epoch.

level
level: LogLevel

Added in version 8.7.0

Severity of the record.

category
category: LogCategory

Added in version 8.7.0

The kind of activity the record describes.

source
source: string

Added in version 8.7.0

Where the record came from, for example ts.bridge for a call made from JavaScript or android.bridge for one reported by the native layer.

message
message: string

Added in version 8.7.0

The name of the method or event the record is about.

fields
fields?: Record<string, unknown>

Added in version 8.7.0

Additional key/value context, such as the identifiers of the mode or view involved, and the arguments of the call unless ScanditLogger.setLogBridgeArgs() has been turned off. Arguments are redacted against the built-in floor, which ScanditLogger.setAdditionalRedactedArgKeys() extends.

durationMs
durationMs?: number

Added in version 8.7.0

How long the call took, for records that measure one.

error
error?: LogRecordError

Added in version 8.7.0

The failure this record reports, if it reports one.

LogRecordError
interface LogRecordError

Added in version 8.7.0

Error attached to a LogRecord.

name
name: string

Added in version 8.7.0

Class name of the error.

message
message: string

Added in version 8.7.0

Message carried by the error.

stack
stack?: string

Added in version 8.7.0

Stack trace. Omitted unless ScanditLogger.setLogErrorStacks() has been enabled, because it can contain file paths from your own application binary. When present it stays in the in-memory buffer; the SDK neither reads nor transmits it.