Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Wrapping

When log lines exceed the terminal width, the terminal hard-wraps them at arbitrary column positions, potentially breaking mid-word. SetWrap enables ANSI-aware wrapping that respects word boundaries and preserves escape sequences (colors, hyperlinks).

Wrap Modes

ModeDescription
WrapNoneNo wrapping; lines are written as-is (default)
WrapHardBreak at the terminal width, even mid-word
WrapSoftBreak at word boundaries, falling back to hard breaks for long words
clog.SetWrap(clog.WrapSoft)
clog.Info().Strs("repos", repos).Int("total", len(repos)).Msg("Cloned")

Wrapping uses the detected terminal width ([Output.Width]) and has no effect on non-TTY outputs.