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. Arguments are redacted against a fixed floor.

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. Never set on a record the SDK stores, because it can contain file paths from your own application binary.