Home / Function/ getLogger() — astro Function Reference

getLogger() — astro Function Reference

Architecture documentation for the getLogger() function in hooks.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  bbee8557_fe56_5f66_5d34_3e7ebb38af0e["getLogger()"]
  19f4084c_157f_a15d_f001_5d8088b75dee["hooks.ts"]
  bbee8557_fe56_5f66_5d34_3e7ebb38af0e -->|defined in| 19f4084c_157f_a15d_f001_5d8088b75dee
  1e1ca282_3771_2cb3_ede6_ff5ab0d382fa["runHookInternal()"]
  1e1ca282_3771_2cb3_ede6_ff5ab0d382fa -->|calls| bbee8557_fe56_5f66_5d34_3e7ebb38af0e
  style bbee8557_fe56_5f66_5d34_3e7ebb38af0e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/integrations/hooks.ts lines 102–110

function getLogger(integration: AstroIntegration, logger: Logger) {
	if (Loggers.has(integration)) {
		// SAFETY: we check the existence in the if block
		return Loggers.get(integration)!;
	}
	const integrationLogger = logger.forkIntegrationLogger(integration.name);
	Loggers.set(integration, integrationLogger);
	return integrationLogger;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does getLogger() do?
getLogger() is a function in the astro codebase, defined in packages/astro/src/integrations/hooks.ts.
Where is getLogger() defined?
getLogger() is defined in packages/astro/src/integrations/hooks.ts at line 102.
What calls getLogger()?
getLogger() is called by 1 function(s): runHookInternal.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free