Documentation ¶
Overview ¶
Package log provides an API to log diagnostics information which is used to give the user more details about what is happening inside of the CLI.
- Stores full request and response information - Provides data to root-cause problems
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DebugLogger ¶
The DebugLogger provides more insights into which operations the CLI is performing.
It can be enabled using the --debug flag.
func (DebugLogger) LogDebug ¶ added in v1.0.26
func (l DebugLogger) LogDebug(message string)
func (DebugLogger) LogError ¶ added in v1.0.19
func (l DebugLogger) LogError(message string)
func (*DebugLogger) LogRequest ¶
func (l *DebugLogger) LogRequest(request RequestInfo)
func (DebugLogger) LogResponse ¶
func (l DebugLogger) LogResponse(response ResponseInfo)
type DefaultLogger ¶
The DefaultLogger does not output any information on standard output.
It only shows error output on standard error.
func (DefaultLogger) LogDebug ¶ added in v1.0.26
func (l DefaultLogger) LogDebug(message string)
func (DefaultLogger) LogError ¶ added in v1.0.19
func (l DefaultLogger) LogError(message string)
func (*DefaultLogger) LogRequest ¶
func (l *DefaultLogger) LogRequest(request RequestInfo)
func (DefaultLogger) LogResponse ¶
func (l DefaultLogger) LogResponse(response ResponseInfo)
type Logger ¶
type Logger interface { LogDebug(message string) LogError(message string) LogRequest(request RequestInfo) LogResponse(response ResponseInfo) }
The Logger interface which is used to provide additional information to the user about what operations the CLI is performing.
type RequestInfo ¶
type RequestInfo struct { Method string Url string Protocol string Header map[string][]string Body io.Reader }
RequestInfo contains the information used by the logger to print debug information which includes the request information.