Skip to content

Instantly share code, notes, and snippets.

@jolheiser
Last active October 21, 2022 20:54
Show Gist options
  • Save jolheiser/c8c9f7da2f2456e14ad89311e003411f to your computer and use it in GitHub Desktop.
Save jolheiser/c8c9f7da2f2456e14ad89311e003411f to your computer and use it in GitHub Desktop.
catlog
package catlog
import (
"github.com/caarlos0/log"
"github.com/charmbracelet/lipgloss"
)
func init() {
log.Styles = [...]lipgloss.Style{
log.DebugLevel: lipgloss.NewStyle().Foreground(lipgloss.Color("#a6adc8")).Bold(true), // Subtext0
log.InfoLevel: lipgloss.NewStyle().Foreground(lipgloss.Color("#89b4fa")).Bold(true), // Blue
log.WarnLevel: lipgloss.NewStyle().Foreground(lipgloss.Color("#f9e2af")).Bold(true), // Yellow
log.ErrorLevel: lipgloss.NewStyle().Foreground(lipgloss.Color("#f38ba8")).Bold(true), // Red
log.FatalLevel: lipgloss.NewStyle().Foreground(lipgloss.Color("#f38ba8")).Bold(true), // Red
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment