Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/dxx/src/lib/$shared.ts>$logger.Metadata

🚀 (Deno) enhanced executor
Latest
class $logger.Metadata
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[]; })

Methods

getAllProps(scopes?: string | string[])
getGlobalData(): AnObject | undefined
getProp(name: string, scopes?: string | string[])
getProps(names: string | string[], scopes?: string | string[])
getScopedData(scope: string): AnObject | undefined
mergeData(data: DeepReadonly<AnObject>)
resetData(data?: DeepReadonly<AnObject>)