Home / Class/ Logger Class — astro Architecture

Logger Class — astro Architecture

Architecture documentation for the Logger class in core.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  fcd437b2_6a25_7c17_c2d9_1d23656b3429["Logger"]
  02538c7d_0423_3484_a5c8_415c85ba2988["core.ts"]
  fcd437b2_6a25_7c17_c2d9_1d23656b3429 -->|defined in| 02538c7d_0423_3484_a5c8_415c85ba2988
  db6b7b08_d4f1_a8f5_3668_e2e40674f8e9["constructor()"]
  fcd437b2_6a25_7c17_c2d9_1d23656b3429 -->|method| db6b7b08_d4f1_a8f5_3668_e2e40674f8e9
  ee9eb8fa_5b8d_6a9e_a350_12c17e8e9174["info()"]
  fcd437b2_6a25_7c17_c2d9_1d23656b3429 -->|method| ee9eb8fa_5b8d_6a9e_a350_12c17e8e9174
  110e55bf_2af8_3e85_037e_29c7caf6b181["warn()"]
  fcd437b2_6a25_7c17_c2d9_1d23656b3429 -->|method| 110e55bf_2af8_3e85_037e_29c7caf6b181
  b83bad93_3b95_235c_a065_775076cc7c95["error()"]
  fcd437b2_6a25_7c17_c2d9_1d23656b3429 -->|method| b83bad93_3b95_235c_a065_775076cc7c95
  128d6241_7854_7695_2f97_a2c17787f427["debug()"]
  fcd437b2_6a25_7c17_c2d9_1d23656b3429 -->|method| 128d6241_7854_7695_2f97_a2c17787f427
  243faa15_2139_c62d_8dea_e6ae8166cb0d["level()"]
  fcd437b2_6a25_7c17_c2d9_1d23656b3429 -->|method| 243faa15_2139_c62d_8dea_e6ae8166cb0d
  dffbe7b7_b345_3ebb_a88e_569ccad0042c["forkIntegrationLogger()"]
  fcd437b2_6a25_7c17_c2d9_1d23656b3429 -->|method| dffbe7b7_b345_3ebb_a88e_569ccad0042c

Relationship Graph

Source Code

packages/astro/src/core/logger/core.ts lines 167–193

export class Logger {
	options: LogOptions;
	constructor(options: LogOptions) {
		this.options = options;
	}

	info(label: LoggerLabel | null, message: string, newLine = true) {
		info(this.options, label, message, newLine);
	}
	warn(label: LoggerLabel | null, message: string, newLine = true) {
		warn(this.options, label, message, newLine);
	}
	error(label: LoggerLabel | null, message: string, newLine = true) {
		error(this.options, label, message, newLine);
	}
	debug(label: LoggerLabel, ...messages: any[]) {
		debug(label, ...messages);
	}

	level() {
		return this.options.level;
	}

	forkIntegrationLogger(label: string) {
		return new AstroIntegrationLogger(this.options, label);
	}
}

Frequently Asked Questions

What is the Logger class?
Logger is a class in the astro codebase, defined in packages/astro/src/core/logger/core.ts.
Where is Logger defined?
Logger is defined in packages/astro/src/core/logger/core.ts at line 167.

Analyze Your Own Codebase

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

Try Supermodel Free