LogPrivacy
in package
FinalYes
Shared, bounded sanitation before interpolation or serialization at any log sink.
Table of Contents
Constants
- SAFE_FIELDS : mixed = ['scope', 'event', 'channel', 'level', 'request...
Methods
- context() : array<string, mixed>
- message() : string
- Redact common credential and contact representations without serializing objects.
- path() : string
- Preserve route prefixes, excluding query strings and record/token values.
Constants
SAFE_FIELDS
private
mixed
SAFE_FIELDS
= ['scope', 'event', 'channel', 'level', 'request_id', 'correlation_id', 'trace_id', 'method', 'request_method', 'host', 'request_host', 'route_template', 'status', 'duration_ms', 'memory_peak_mb', 'cpu_user_ms', 'cpu_sys_ms', 'query_count', 'db_total_ms', 'response_bytes', 'kingdom', 'php_version', 'php_sapi', 'php_os', 'app_version', 'file_size', 'count', 'skipped_count', 'processed_pages', 'waiver_images_count', 'gathering_waiver_id', 'waiver_type_id', 'tenant_id', 'member_id', 'job_id', 'request_query_number', 'query_number', 'turbo_frame', 'is_ajax', 'success', 'connection', 'role', 'took', 'numRows']
Methods
context()
public
static context(array<string|int, mixed> $context[, int $depth = 0 ]) : array<string, mixed>
Parameters
- $context : array<string|int, mixed>
- $depth : int = 0
Return values
array<string, mixed>message()
Redact common credential and contact representations without serializing objects.
public
static message(Stringable|string $message) : string
Parameters
- $message : Stringable|string
Return values
stringpath()
Preserve route prefixes, excluding query strings and record/token values.
public
static path(string $target) : string
Parameters
- $target : string