MCPcopy
hub / github.com/serverless/serverless / get

Method get

packages/util/src/logger/index.js:607–622  ·  view source on GitHub ↗

* Find or create a child namespace on this renderer instance.

(newNamespace)

Source from the content-addressed store, hash-verified

605 * Find or create a child namespace on this renderer instance.
606 */
607 get(newNamespace) {
608 // Get the child namespace
609 newNamespace = `${this.namespace}:${newNamespace}`
610 // Check if the full namespace already exists
611 if (!renderer.state.namespaces.has(newNamespace)) {
612 // If not, create a new renderer instance with the given full namespace
613 renderer.state.namespaces.set(
614 newNamespace,
615 new Logger({
616 namespace: newNamespace,
617 }),
618 )
619 }
620 // Return the renderer instance from the global registry
621 return renderer.state.namespaces.get(newNamespace)
622 }
623
624 /**
625 * Detect whether the Logger is running in an interactive environment.

Callers 15

e2e.test.jsFile · 0.45
index.jsFile · 0.45
index.jsFile · 0.45
index.jsFile · 0.45
remove.jsFile · 0.45
deploy.jsFile · 0.45
apps.jsFile · 0.45
deployAwsLambda.jsFile · 0.45
index.jsFile · 0.45
remove.jsFile · 0.45

Calls 1

setMethod · 0.80

Tested by

no test coverage detected