Skip to content

Commit

Permalink
Duplicated all prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasdille committed Jul 24, 2023
1 parent 48e9c27 commit 3ac77c7
Showing 1 changed file with 59 additions and 5 deletions.
64 changes: 59 additions & 5 deletions pkg/logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,65 @@ package logging
import "github.com/pterm/pterm"

var (
Info = pterm.Info
Error = pterm.Error
Debug = pterm.Debug
Warning = pterm.Warning
Skip = pterm.PrefixPrinter{
Description = pterm.PrefixPrinter{
MessageStyle: &pterm.ThemeDefault.DescriptionMessageStyle,
Prefix: pterm.Prefix{
Style: &pterm.ThemeDefault.DescriptionPrefixStyle,
Text: "Description",
},
}

Info = pterm.PrefixPrinter{
MessageStyle: &pterm.ThemeDefault.InfoMessageStyle,
Prefix: pterm.Prefix{
Style: &pterm.ThemeDefault.InfoPrefixStyle,
Text: "INFO",
},
}

Success = pterm.PrefixPrinter{
MessageStyle: &pterm.ThemeDefault.SuccessMessageStyle,
Prefix: pterm.Prefix{
Style: &pterm.ThemeDefault.SuccessPrefixStyle,
Text: "SUCCESS",
},
}

Error = pterm.PrefixPrinter{
MessageStyle: &pterm.ThemeDefault.ErrorMessageStyle,
Prefix: pterm.Prefix{
Style: &pterm.ThemeDefault.ErrorPrefixStyle,
Text: " ERROR ",
},
}

Fatal = pterm.PrefixPrinter{
MessageStyle: &pterm.ThemeDefault.FatalMessageStyle,
Prefix: pterm.Prefix{
Style: &pterm.ThemeDefault.FatalPrefixStyle,
Text: " FATAL ",
},
Fatal: true,
}

Debug = pterm.PrefixPrinter{
MessageStyle: &pterm.ThemeDefault.DebugMessageStyle,
Prefix: pterm.Prefix{
Text: " DEBUG ",
Style: &pterm.ThemeDefault.DebugPrefixStyle,
},
Debugger: true,
}

Warning = pterm.PrefixPrinter{
MessageStyle: &pterm.ThemeDefault.WarningMessageStyle,
Prefix: pterm.Prefix{
Style: &pterm.ThemeDefault.WarningPrefixStyle,
Text: "WARNING",
},
}

Skip = pterm.PrefixPrinter{
MessageStyle: pterm.NewStyle(pterm.FgDarkGray),
Prefix: pterm.Prefix{
Style: pterm.NewStyle(pterm.FgBlack, pterm.BgGray),
Expand Down

0 comments on commit 3ac77c7

Please sign in to comment.