Help us shape the future of Go! Take the 2026 Go Developer Survey

logging

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package logging writes Ghost's log file: errors in full and the actions Ghost takes, so text the TUI has to cut short can still be read.

Index

Constants

View Source
const MaxSize = 5 << 20

MaxSize is when the log rotates: the current file becomes <path>.1 (replacing any older copy) and a new file starts.

Variables

This section is empty.

Functions

func Open

func Open(path string) (*slog.Logger, io.Closer, error)

Open returns a logger that appends to path, creating its directory. An empty path returns a logger that discards everything. Close the returned io.Closer when done. Records use slog's text format, which escapes control characters, so a hostile message can't mess up a terminal tailing the log.

Types

This section is empty.

Jump to

Keyboard shortcuts

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