console
flavor.console
¶
TODO: Add module docstring.
Functions¶
echo
¶
Output a message to stdout with automatic Unicode handling.
Uses Foundation's pout() which handles Unicode and terminal compatibility automatically.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
Message to output |
required |
**kwargs
|
Any
|
Additional arguments (currently unused, for compatibility) |
{}
|
Source code in flavor/console.py
echo_error
¶
Output an error message to stderr with automatic Unicode handling.
Uses Foundation's perr() which handles Unicode and terminal compatibility automatically.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
Error message to output |
required |
**kwargs
|
Any
|
Additional arguments (currently unused, for compatibility) |
{}
|
Source code in flavor/console.py
get_command_logger
¶
Get a structured logger for a command.
The logger uses Foundation's DAS (Duration/Action/Status) event system which automatically prefixes logs with appropriate emojis based on the event type and context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
command_name
|
str
|
Name of the command (e.g., 'pack', 'verify') |
required |
Returns:
| Type | Description |
|---|---|
Any
|
Configured structlog logger with DAS emoji prefixing |
Example
log = get_command_logger("pack") log.debug("Starting packaging process", manifest=manifest_path) log.info("Package built successfully", output=output_path) log.error("Packaging failed", error=str(e))