version_bump/logging

A tiny leveled logger for the release pipeline.

Mirrors semantic-release’s use of a prefixed, leveled signale/console logger. Each message is printed to stdout with a [version_bump] prefix and a colorized level tag. Logging is a side effect, so every function returns Nil.

Types

Severity level of a log message.

pub type Level {
  Info
  Warn
  Err
  Success
  Debug
}

Constructors

  • Info
  • Warn
  • Err
  • Success
  • Debug

Values

pub fn error(msg: String) -> Nil

Log an error.

pub fn format(level: Level, msg: String) -> String

Render a level + message into a single colorized, prefixed line. Pure so it can be unit-tested without producing side effects.

pub fn info(msg: String) -> Nil

Log an informational message.

pub fn log(level: Level, msg: String) -> Nil

Log a message at the given level. This is the single primitive that the convenience helpers below delegate to.

pub fn success(msg: String) -> Nil

Log a success message.

pub fn warn(msg: String) -> Nil

Log a warning.

Search Document