createLog(
args
: {key
:string
;level
:string
;lix
:Lix
;message?
:null
|string
;payload?
:JSONType
; }):Promise
<LixSelectable
<EntityStateView
<{id
:LixGenerated
<string
>;key
:string
;level
:string
;message?
:null
|string
;payload
:unknown
; }>>>
Directly creates a log entry in the Lix database without applying any filters.
This function inserts the log entry regardless of the lix_log_levels
setting
in the key-value store. It is the responsibility of the calling application
to implement any desired log level filtering before invoking this function.
Use snake_case
for log keys (e.g., app_checkout_submit
) to keep filters predictable.
Provide either a message
, a structured payload
, or both depending on your needs.
Parameter | Type |
---|---|
args | { key : string ; level : string ; lix : Lix ; message? : null | string ; payload? : JSONType ; } |
args.key | string |
args.level | string |
args.lix | Lix |
args.message? | null | string |
args.payload? | JSONType |
Promise
<LixSelectable
<EntityStateView
<{ id
: LixGenerated
<string
>; key
: string
; level
: string
; message?
: null
| string
; payload
: unknown
; }>>>
A promise that resolves with the created log entry.