safeValue()
function safeValue\<T\>(value: T): {
__safe: true;
value: T;
};Defined in: src/lib/logging/redaction.ts:1001
Marks a value as safe to log without redaction. Use this sparingly and only for values you're certain don't contain PII.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Description |
|---|---|---|
value | T | The value to mark as safe. |
Returns
{
__safe: true;
value: T;
}An object that will be logged without redaction.
| Name | Type | Defined in |
|---|---|---|
__safe | true | src/lib/logging/redaction.ts:1001 |
value | T | src/lib/logging/redaction.ts:1001 |
Example
// This email will be logged without redaction
logger.info("System email", { email: safeValue("no-reply@system.local") });