Documentation ¶
Index ¶
- Variables
- func AddReplacer(r ReplacerFunc)
- func CheckURL(url string) (err error)
- func Close(c io.Closer, f func(err error))
- func DefaultLogFilepath() (fp string)
- func FilepathForLog(a slog.Attr) string
- func Initialize(params Params) (err error)
- func NewSLogTeeHandler(h1, h2 slog.Handler) slog.Handler
- func SourceRootDir() string
- func ValidLogLevelsString() string
- func WarnOnError(err error)
- type LogLevelName
- type NullSLogHandler
- type Options
- type Opts
- type Params
- type ReplacerFunc
- type SLogTeeHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var LogFilename string
View Source
var StderrWriter io.Writer = os.Stderr
Functions ¶
func AddReplacer ¶
func AddReplacer(r ReplacerFunc)
func DefaultLogFilepath ¶
func DefaultLogFilepath() (fp string)
func FilepathForLog ¶
func Initialize ¶
func SourceRootDir ¶
func SourceRootDir() string
func ValidLogLevelsString ¶
func ValidLogLevelsString() string
ValidLogLevelsString provides a human-readable string showing log level options for CLI help.
func WarnOnError ¶
func WarnOnError(err error)
Types ¶
type LogLevelName ¶
type LogLevelName string
const ( LogLevelDebug LogLevelName = "debug" LogLevelInfo LogLevelName = "info" LogLevelWarn LogLevelName = "warn" LogLevelError LogLevelName = "error" LogLevelNone LogLevelName = "none" )
type NullSLogHandler ¶
type NullSLogHandler struct{}
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
func (*Options) LogFilepath ¶
func (*Options) LogLevel ¶
func (o *Options) LogLevel() LogLevelName
Click to show internal directories.
Click to hide internal directories.