* Find or create a child namespace on this renderer instance.
(newNamespace)
| 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. |
no test coverage detected