logger

package
v0.36.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DocsURL added in v0.33.0

func DocsURL(docsPath string) string

DocsURL resolves Railpack-relative docs paths while preserving absolute URLs.

Types

type Level

type Level string
const (
	Info        Level = "info"
	Warn        Level = "warn"
	Deprecation Level = "deprecation"
	Suggestion  Level = "suggestion"
	Error       Level = "error"

	DocsBaseURL = "https://railpack.com"
)

type Logger

type Logger struct {
	Logs []Msg
}

func NewLogger

func NewLogger() *Logger

func (*Logger) LogDeprecation added in v0.33.0

func (l *Logger) LogDeprecation(format string, args ...any)

func (*Logger) LogError

func (l *Logger) LogError(format string, args ...any)

func (*Logger) LogInfo

func (l *Logger) LogInfo(format string, args ...any)

func (*Logger) LogSuggestion added in v0.33.0

func (l *Logger) LogSuggestion(msg string, docsPath ...string)

LogSuggestion records a helpful config suggestion with an optional docs link. Relative paths resolve against railpack.com; absolute URLs are used unchanged.

func (*Logger) LogWarn

func (l *Logger) LogWarn(format string, args ...any)

type Msg

type Msg struct {
	Level    Level
	Msg      string
	DocsPath string // optional Railpack-relative path or absolute URL
}

Jump to

Keyboard shortcuts

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