devlog

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Banner(version string, url string, hostFlag string, duration time.Duration)

Banner prints the server startup banner without a timestamp prefix.

func BgGreen

func BgGreen(s string) string

func Blue

func Blue(s string) string

func Bold

func Bold(s string) string

func ClearProgress added in v1.0.0

func ClearProgress()

ClearProgress removes the in-place progress line from the terminal.

func Cyan

func Cyan(s string) string

func Dim

func Dim(s string) string

func Error

func Error(tag, format string, args ...any)

Error prints an error log line: "15:04:05 [ERROR] [tag] message"

func FormatLog added in v1.0.0

func FormatLog(tag, msg string) string

FormatLog returns a formatted log line without printing it.

func Green

func Green(s string) string

func Log

func Log(tag, format string, args ...any)

Log prints a tagged info log line: "15:04:05 [tag] message"

func Red

func Red(s string) string

func Request

func Request(method, path string, status int, duration time.Duration)

Request prints an HTTP request log line. Skips /ws and /favicon.ico.

func SetProgress added in v1.0.0

func SetProgress(tag, format string, args ...any)

SetProgress sets (or updates) the in-place progress line. The line is formatted with FormatLog and written with \r (no newline). Concurrent devlog.Log/Warn/Error/Request calls will clear it, write their own line, then redraw it, so interleaving is clean.

func Warn

func Warn(tag, format string, args ...any)

Warn prints a warning log line: "15:04:05 [WARN] [tag] message"

func Yellow

func Yellow(s string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL