Add comments for CLILogger
This commit is contained in:
parent
35cd34ae9c
commit
ea30505f4e
4
cli.go
4
cli.go
@ -16,6 +16,9 @@ import (
|
|||||||
|
|
||||||
var _ Logger = (*CLILogger)(nil)
|
var _ Logger = (*CLILogger)(nil)
|
||||||
|
|
||||||
|
// CLILogger is a logger meant to be used for CLI tools
|
||||||
|
// where users will view and read the logs throughout the
|
||||||
|
// application's execution
|
||||||
type CLILogger struct {
|
type CLILogger struct {
|
||||||
Out io.Writer
|
Out io.Writer
|
||||||
Level LogLevel
|
Level LogLevel
|
||||||
@ -35,6 +38,7 @@ type CLILogger struct {
|
|||||||
PanicColor color.Color
|
PanicColor color.Color
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewCLI creates and returns a new CLILogger
|
||||||
func NewCLI(out io.Writer) *CLILogger {
|
func NewCLI(out io.Writer) *CLILogger {
|
||||||
useColor := false
|
useColor := false
|
||||||
if f, ok := out.(*os.File); ok {
|
if f, ok := out.(*os.File); ok {
|
||||||
|
Reference in New Issue
Block a user