MCPcopy
hub / github.com/simstudioai/sim / withMetadata

Method withMetadata

packages/logger/src/index.ts:188–195  ·  view source on GitHub ↗

* Creates a child logger with additional metadata merged in. * The child inherits this logger's module name, config, and existing metadata. * New metadata keys override existing ones with the same name.

(metadata: LoggerMetadata)

Source from the content-addressed store, hash-verified

186 * New metadata keys override existing ones with the same name.
187 */
188 withMetadata(metadata: LoggerMetadata): Logger {
189 const child = Object.create(Logger.prototype) as Logger
190 child.module = this.module
191 child.config = this.config
192 child.isDev = this.isDev
193 child.metadata = { ...this.metadata, ...metadata }
194 return child
195 }
196
197 /**
198 * Determines if a log at the given level should be displayed

Callers 12

index.test.tsFile · 0.45
recordExecutionUsageMethod · 0.45
route.tsFile · 0.45
handleAsyncExecutionFunction · 0.45
handleExecutePostFunction · 0.45
constructorMethod · 0.45
constructorMethod · 0.45
constructorMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected