Expand description
Bounded previews and caps for mismatch warnings.
Constants§
- SHADOW_
LOG_ DIFF_ MAX_ BYTES - Maximum UTF-8 bytes of a logged
diff_json. - SHADOW_
LOG_ KEY_ MAX_ BYTES - Maximum UTF-8 bytes of a logged cache key.
- SHADOW_
LOG_ TRUNCATION_ MARKER - Marker appended to a clamped preview.
- SHADOW_
LOG_ VALUE_ MAX_ BYTES - Maximum UTF-8 bytes of a logged value preview.
- SHADOW_
MISMATCH_ MAX_ DEPTH - Reference tokens in the deepest pointer the built-in walk reports.
- SHADOW_
MISMATCH_ MAX_ ENTRIES - Most difference entries a warning lists;
mismatch_path_countkeeps the uncut total. - SHADOW_
MISMATCH_ PATH_ MAX_ BYTES - Maximum UTF-8 bytes of one logged JSON Pointer.
- SHADOW_
MISMATCH_ SIDE_ MAX_ BYTES - Maximum UTF-8 bytes of one entry side’s JSON in
diff_json; a longer side is logged as its clamped JSON text.
Functions§
- clamp_
utf8 - Clamp text to
max_bytesof UTF-8, ending a clamped result with the truncation marker on a character boundary. - preview_
key - Clamp a logical key to
SHADOW_LOG_KEY_MAX_BYTES. - preview_
value - Clamp a value’s JSON preview to
SHADOW_LOG_VALUE_MAX_BYTES.