Crate tana_stdio

Crate tana_stdio 

Source
Expand description

§tana-stdio

Terminal output utilities for Tana projects. Consistent formatting across CLI, services, and tools.

§Format

[action] message

§Usage

use tana_stdio::{log, error, warn, success, fail};

log("build", "compiling contract...");
success("build complete");
error("build", "compilation failed");

§Log Levels

Control output with LOG_LEVEL environment variable:

  • error - Errors only
  • info - Default (startup + important messages)
  • debug - Verbose output

Macros§

debugf
Debug with format string support (only shown when LOG_LEVEL=debug)
errorf
Error with format string support
logf
Log with format string support

Enums§

LogLevel
Log level for tana services

Functions§

blank
Print a blank line
debug
Debug log (only shown when LOG_LEVEL=debug)
detail
Detail line with arrow Format: -> message
diagnostic
Diagnostic warning Format: [warn] [component] message
error
Log an error Format: [action] message
fail
Failure message Format: [fail] message
header
Print a section header
hint
Hint in subdued format Format: message
info
Info line with label Format: label value
is_debug
Check if debug logging is enabled
is_info
Check if info logging is enabled
log
Log an action with a message Format: [action] message
log_level
Get the current log level (cached from LOG_LEVEL env var)
next_step
Suggest a next step Format: -> description: command
status
Log a status line with success/failure indicator Format: [ok] message or [fail] message
success
Success message Format: [ok] message
warn
Log a warning Format: [warn] message or [name] message
warn_simple
Log a simple warning without component name Format: [warn] message