@graphty/graphty-element / extend / LogDestinationDefinition
Interface: LogDestinationDefinition ​
Defined in: graphty-element/src/simple/types.ts:419
What defineLogDestination takes: an id and write.
Properties ​
attach? ​
readonlyoptionalattach?:boolean
Defined in: graphty-element/src/simple/types.ts:438
Attach now (the default) or only register, for a configuration to turn on by id.
categories? ​
readonlyoptionalcategories?: readonlystring[]
Defined in: graphty-element/src/simple/types.ts:429
Only records whose category contains one of these segments.
description? ​
readonlyoptionaldescription?:string
Defined in: graphty-element/src/simple/types.ts:425
One sentence for the catalogue.
id ​
readonlyid:string
Defined in: graphty-element/src/simple/types.ts:421
Permanent id: lower case, hyphenated, vendor-prefixed ("acme-telemetry"). Defining it again replaces the earlier one.
level? ​
readonlyoptionallevel?:LogLevelName
Defined in: graphty-element/src/simple/types.ts:427
The least severe level delivered. Default "warn".
name? ​
readonlyoptionalname?:string
Defined in: graphty-element/src/simple/types.ts:423
What a destination picker shows. Default: the id in sentence case.
write ​
readonlywrite: (record) =>void|Promise<unknown>
Defined in: graphty-element/src/simple/types.ts:436
May return a promise (a fetch); the element queues, orders, retries and flushes. A rejection, or a promise that resolves to a fetch Response whose ok is false, counts as a failed send. Promise<unknown>, so fetch(...) (a Promise<Response>) can be returned as it is.
Parameters ​
record ​
Returns ​
void | Promise<unknown>