Documentation ¶
Index ¶
Constants ¶
View Source
const ( ColorModeEnvName = "S1_LOGRUS_COLOR_MODE" DefaultTimeFormat = "2006-01-02 15:04:05.000 MST" DefaultTimeColor = -1 DefaultCallerColor = terminal.ForegroundColorBrightBlue DefaultMessageColor = -1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logrus ¶
type Logrus struct { // On Windows combine it with "github.com/mattn/go-colorable". // For example: // if runtime.GOOS == "windows" { // log.SetOutput(colorable.NewColorableStdout()) // } else { // log.SetOutput(os.Stdout) // } EnableColors bool // TODO The feature is under development. // Set this to true to enable advanced coloring and message parsing. // Disable, if you have any performance issues. AdvancedColors bool // Set this to true, if you do not want to print timestamp, // e.g. it is added by external log system. SkipTime bool // Default is DefaultTimeFormat. TimeFormat string // Use values less than zero to disable timestamp coloring. // Use a valid terminal color to set up coloring. // Any other value (for example, 0) means DefaultTimeColor. // Ignored if coloring is not enabled for this formatter. TimeColor int // Use values less than zero to disable caller coloring. // Use a valid terminal color to set up coloring. // Any other value (for example, 0) means DefaultCallerColor. // Ignored if coloring is not enabled for this formatter. CallerColor int // Use values less than zero to disable caller coloring. // Use a valid terminal color to set up coloring. // Any other value (for example, 0) means DefaultMessageColor. // Ignored if coloring is not enabled for this formatter. MessageColor int }
Click to show internal directories.
Click to hide internal directories.