Documentation
¶
Index ¶
- type Logger
- func (l *Logger) Debug(msg string, args ...interface{})
- func (l *Logger) Error(msg string, args ...interface{})
- func (l *Logger) ImpliedArgs() []interface{}
- func (l *Logger) Info(msg string, args ...interface{})
- func (l *Logger) IsDebug() bool
- func (l *Logger) IsError() bool
- func (l *Logger) IsInfo() bool
- func (l *Logger) IsTrace() bool
- func (l *Logger) IsWarn() bool
- func (l *Logger) Log(level hclog.Level, msg string, args ...interface{})
- func (l *Logger) Name() string
- func (l *Logger) Named(name string) hclog.Logger
- func (l *Logger) ResetNamed(name string) hclog.Logger
- func (l *Logger) SetLevel(level hclog.Level)
- func (l *Logger) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger
- func (l *Logger) StandardWriter(opts *hclog.StandardLoggerOptions) io.Writer
- func (l *Logger) Trace(msg string, args ...interface{})
- func (l *Logger) Warn(msg string, args ...interface{})
- func (l *Logger) With(args ...interface{}) hclog.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) ImpliedArgs ¶
func (l *Logger) ImpliedArgs() []interface{}
ImpliedArgs returns With key/value pairs
func (*Logger) IsTrace ¶
Indicate if TRACE logs would be emitted. This and the other Is* guards are used to elide expensive logging code based on the current level.
func (*Logger) Named ¶
Create a logger that will prepend the name string on the front of all messages. If the logger already has a name, the new value will be appended to the current name. That way, a major subsystem can use this to decorate all it's own logs without losing context.
func (*Logger) ResetNamed ¶
Create a logger that will prepend the name string on the front of all messages. This sets the name of the logger to the value directly, unlike Named which honor the current name as well.
func (*Logger) SetLevel ¶
func (l *Logger) SetLevel(level hclog.Level)
Updates the level. This should affect all related loggers as well, unless they were created with IndependentLevels. If an implementation cannot update the level on the fly, it should no-op.
func (*Logger) StandardLogger ¶
Return a value that conforms to the stdlib log.Logger interface
func (*Logger) StandardWriter ¶
Return a value that conforms to io.Writer, which can be passed into log.SetOutput()