NativeScope / Logs

Configuration

Tune captured levels, serialization bounds, batching and startup buffering without changing the app's logging calls.

The shortest configuration is one line:

modules: {
  logs: true,
}

Use an object when the defaults do not fit the volume or shape of your app:

modules: {
  logs: {
    levels: ["log", "warn", "error"],
    maxArgLength: 8192,
    maxDepth: 6,
    maxBatchEntries: 200,
    flushMs: 120,
    maxPerSecond: 500,
    preReadyBuffer: 500,
    ignorePatterns: ["[VerboseAnimationLib]"],
  },
}

Options

OptionWhat it controlsDefault
levelsConsole levels captured. The original console still receives every call.All five levels
maxArgLengthMaximum characters for one serialized argument before it is bounded.8192
maxDepthMaximum object depth sent to the Studio.6
maxBatchEntriesMaximum entries in one transport batch.200
flushMsMaximum time a batch waits before it is sent.120 ms
maxPerSecondHard per-second entry ceiling. Excess entries become dropped.500
preReadyBufferEntries retained while the Studio connection is not ready.500
ignorePatternsMessage substrings ignored before capture.NativeScope noise patterns
redactReplace secret-looking object keys with «redacted» before they leave the device.true
redactKeysExtra keys to redact, added to the defaults.[]
maxMessageLengthMaximum characters for the rendered message line.4096
maxArgsArguments captured per call; the rest become a marker.12
maxKeysObject keys serialized per level.100
maxArrayItemsArray items serialized per level.100
maxStringLengthCut for strings nested inside objects.2048
maxBatchCharsCharacter budget for one transport batch.98304

Choosing limits

Lower levels when a library's debug output is useful in Metro but not in the Studio. Increase maxArgLength or maxDepth when the detail you need is being capped, but remember that larger values consume more memory and wire budget. Increase maxPerSecond only when the additional stream is worth the cost of serializing and rendering it.

The typed public options intentionally focus on the decisions most projects need. Internal caps for message length, argument count, keys, array items, strings and batch bytes remain safety defaults rather than extra configuration knobs.

Timeline does not need another option

Timeline reads the Logs, Network and Storage stores already present in the Studio. Its source toggles and time/event window are user controls in the desktop UI, not app configuration. See Timeline for how to choose a scope.