logutil

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package logutil provides structured, grep-friendly logging to stderr.

Every message is prefixed with an ISO 8601 timestamp and a level tag (ERROR, WARN, INFO, DEBUG). When a project identifier is available, the "P" variants (ErrorP, WarnP, …) insert it as [project] after the level.

Output format:

2026-03-20T10:32:00-07:00 ERROR: synapses: something broke: file not found
2026-03-20T10:32:00-07:00 INFO: [abc123] synapses: project ready

This is NOT a full structured logging framework — it is a minimal, grep-friendly convention that enables `grep ERROR:` for incident triage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(format string, args ...interface{})

Debug logs a DEBUG-level message to stderr with timestamp.

func DebugP

func DebugP(project string, format string, args ...interface{})

DebugP logs a DEBUG-level message with project identifier.

func Error

func Error(format string, args ...interface{})

Error logs an ERROR-level message to stderr with timestamp.

func ErrorP

func ErrorP(project string, format string, args ...interface{})

ErrorP logs an ERROR-level message with project identifier.

func Info

func Info(format string, args ...interface{})

Info logs an INFO-level message to stderr with timestamp.

func InfoP

func InfoP(project string, format string, args ...interface{})

InfoP logs an INFO-level message with project identifier.

func Warn

func Warn(format string, args ...interface{})

Warn logs a WARN-level message to stderr with timestamp.

func WarnP

func WarnP(project string, format string, args ...interface{})

WarnP logs a WARN-level message with project identifier.

Types

This section is empty.

Jump to

Keyboard shortcuts

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