logger

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 3 Imported by: 4 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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