forked from Katenary/katenary
4.1 KiB
4.1 KiB
logger
import "katenary.io/internal/logger"
Package logger provides simple logging functions with icons and colors.
func Failure
func Failure(msg ...any)
Failure prints a failure message.
func Failuref
func Failuref(format string, msg ...any)
Failuref prints a formatted failure message.
func Fatal
func Fatal(msg ...any)
Fatal prints a fatal error message and exits with code 1.
func Fatalf
func Fatalf(format string, msg ...any)
Fatalf prints a fatal error message with formatting and exits with code 1.
func Info
func Info(msg ...any)
Info prints an informational message.
func Infof
func Infof(format string, msg ...any)
Infof prints a formatted informational message.
func Log
func Log(icon Icon, msg ...any)
Log prints a message with a custom icon.
func Logf
func Logf(icon Icon, format string, msg ...any)
Logf prints a formatted message with a custom icon.
func Print
func Print(msg ...any)
Print prints a message without icon.
func Printf
func Printf(format string, msg ...any)
Printf prints a formatted message without icon.
func Success
func Success(msg ...any)
Success prints a success message.
func Successf
func Successf(format string, msg ...any)
Successf prints a formatted success message.
func Warn
func Warn(msg ...any)
Warn prints a warning message.
func Warnf
func Warnf(format string, msg ...any)
Warnf prints a formatted warning message.
type Icon
Icon is a unicode icon
type Icon string
const (
IconSuccess Icon = "✅"
IconFailure Icon = "❌"
IconWarning Icon = "❕"
IconNote Icon = "📝"
IconWorld Icon = "🌐"
IconPlug Icon = "🔌"
IconPackage Icon = "📦"
IconCabinet Icon = "🗄️"
IconInfo Icon = "🔵"
IconSecret Icon = "🔒"
IconConfig Icon = "🔧"
IconDependency Icon = "🔗"
)
Generated by gomarkdoc