compiler/stage2_l0/src/util/log.l0
Module util.log
Overview Symbols grouped by source file: compiler/stage2_l0/src/util/log.l0
Module: util.log
Source: compiler/stage2_l0/src/util/log.l0 Language: Dea/L0
Imports / Includes
std.textstd.stringstd.io
Symbols
- LogLevel
- log_config_create
- log_level_from_verbosity
- log_level_name
- log_msg
- log_error
- log_warning
- log_info
- log_debug
- log_format_stage
- log_stage
- LogConfig
Enum LogLevel
LogLevel
Defines the LogLevel enumeration.
Variants:
LL_SILENTLL_ERRORLL_WARNINGLL_INFOLL_DEBUG
Function log_config_create
func log_config_create(level: LogLevel, rich: bool) -> LogConfig*
Create a logging configuration.
Parameters:
level: Minimum log level to emit.rich: Whether to prefix messages with level labels.
Returns: A new logging configuration.
Function log_level_from_verbosity
func log_level_from_verbosity(verbosity: int) -> LogLevel
Map a CLI verbosity count to a log level.
Parameters:
verbosity: Verbosity count from command-line flags.
Returns: Log level implied by verbosity.
Function log_level_name
func log_level_name(level: LogLevel) -> string
Return the printable name for a log level.
Parameters:
level: Log level to format.
Returns: Uppercase display name for level.
Function log_msg
func log_msg(cfg: LogConfig*, level: LogLevel, message: string)
Emit a log message if the configuration allows the given level.
Parameters:
cfg: Logging configuration.level: Severity level of the message.message: Message text to emit.
Function log_error
func log_error(cfg: LogConfig*, message: string)
Log an error message.
Parameters:
cfg: Logging configuration.message: Message text to emit.
Function log_warning
func log_warning(cfg: LogConfig*, message: string)
Log a warning message.
Parameters:
cfg: Logging configuration.message: Message text to emit.
Function log_info
func log_info(cfg: LogConfig*, message: string)
Log an informational message.
Parameters:
cfg: Logging configuration.message: Message text to emit.
Function log_debug
func log_debug(cfg: LogConfig*, message: string)
Log a debug message.
Parameters:
cfg: Logging configuration.message: Message text to emit.
Function log_format_stage
func log_format_stage(stage: string, module_name: string) -> string
Format a stage progress message.
Parameters:
stage: Human-readable stage label.module_name: Module name to include when available.
Returns: Formatted stage message.
Function log_stage
func log_stage(cfg: LogConfig*, stage: string, module_name: string)
Log a stage progress message at info level.
Parameters:
cfg: Logging configuration.stage: Human-readable stage label.module_name: Module name to include when available.
Struct LogConfig
Represents the LogConfig structure.
LogConfig Field level
level: LogLevel
LogConfig Field rich
rich: bool