import { $logger } from "https://deno.land/x/dxx@rf/src/lib/$shared.ts";
const { Metadata } = $logger;
Semi-structured data accessible to consumers of LogEntry
via getData()
, getProp...()
, etc.
- data is free-form
- as a convention, property "scopes" (which are named sub-objects) can be used to direct data to specific consumers
- a usual scope priority would be [ instanceID, classID, GLOBAL ]
Constructors
new
Metadata(o?: DeepReadonly<AnObject>, options?: { globalScope?: string; defScopeChain?: string[]; })Properties
_data: AnObject
Methods
getAllProps(scopes?: string | string[])
getData()
getGlobalData(): AnObject | undefined
getProp(name: string, scopes?: string | string[])
getProps(names: string | string[], scopes?: string | string[])
getScopedData(scope: string): AnObject | undefined