Custom Levels
With this release of Log, you can now style your custom level to your liking!
// Define a new level
const SuccessLevel = log.InfoLevel + 1
// Create a style
styles := log.DefaultStyles()
styles.Levels[SuccessLevel] = lipgloss.NewStyle().
SetString("SUCCESS").
Bold(true).
Foreground(lipgloss.Color("42"))
// Set the styles on the default logger
log.SetStyles(styles)
// Define your custom func
func Success(msg string, args ...any) {
log.Default().Log(SuccessLevel, msg, args...)
}Along with that, this release includes some important bug fixes detailed below.
Changelog
New Features
Bug fixes
Dependency updates
Documentation updates
Other work
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.