log

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const LinePrefix = "🤖 "
View Source
const TimeFormat = "3:04:05.000 PM"

Variables

This section is empty.

Functions

func ClearLogs added in v0.7.0

func ClearLogs()

ClearLogs clears the console.

func Debugf added in v0.6.0

func Debugf(f string, v ...any)

Debugf prints an info line to console.

func Durf

func Durf(msg string, d time.Duration)

Durf prints an error.

func Error added in v0.7.0

func Error(msg string)

Errorf prints an error line to console.

func Errorf

func Errorf(f string, v ...any)

Errorf is similar to Error but with formatting.

func FatalCmdNotAvailable added in v0.7.4

func FatalCmdNotAvailable(cmd, helpURL string)

FatalCmdNotAvailable prints an error line to console about a cmd that's required for Templiér to run not being available and exits process with error code 1.

func FatalCustomWatcherCmdNotAvailable added in v0.7.4

func FatalCustomWatcherCmdNotAvailable(cmd, customWatcherName string)

FatalCustomWatcherCmdNotAvailable prints an error line to console about a cmd that's required for a custom watcher to run not being available and exits process with error code 1.

func Fatalf

func Fatalf(f string, v ...any)

Fatalf prints an error line to console and exits process with error code 1.

func Infof

func Infof(f string, v ...any)

Infof prints an info line to console.

func SetLogLevel added in v0.6.0

func SetLogLevel(l LogLevel)

func TemplierFileChange

func TemplierFileChange(e fsnotify.Event)

TemplierFileChange prints a file change log to console.

func TemplierRestartingServer

func TemplierRestartingServer(cmdServerPath string)

TemplierRestartingServer prints the server restart trigger log to console.

func TemplierStarted

func TemplierStarted(baseURL string)

TemplierStarted prints the Templiér started log to console.

func WarnUnsupportedTemplVersion added in v0.10.0

func WarnUnsupportedTemplVersion(
	templierVersion, supportedTemplVersion, currentTemplVersion string,
)

WarnUnsupportedTemplVersion prints a warning line to console about the currently installed templ version not matching the templ version that the installed version of Templier supports.

Types

type LogLevel added in v0.6.0

type LogLevel int32
const (
	LogLevelErrOnly LogLevel = 0
	LogLevelVerbose LogLevel = 1
	LogLevelDebug   LogLevel = 2
)

func Level added in v0.6.0

func Level() LogLevel

Jump to

Keyboard shortcuts

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