Documentation
¶
Index ¶
- func MergeEntry(a *logrus.Entry, b *logrus.Entry) *logrus.Entry
- func New() *logrus.Logger
- func NewEntry(err error) *logrus.Entry
- func SetJSONFormat()
- func SetOutput(out ...io.Writer)
- func SetTextFormat()
- func ShowStack()
- type F
- type HCLogAdapter
- func (h *HCLogAdapter) CreateEntry(args []interface{}) *logrus.Entry
- func (h *HCLogAdapter) Debug(msg string, args ...interface{})
- func (h *HCLogAdapter) Error(msg string, args ...interface{})
- func (h *HCLogAdapter) ImpliedArgs() []interface{}
- func (h *HCLogAdapter) Info(msg string, args ...interface{})
- func (h *HCLogAdapter) IsDebug() bool
- func (h *HCLogAdapter) IsError() bool
- func (h *HCLogAdapter) IsInfo() bool
- func (h *HCLogAdapter) IsTrace() bool
- func (h *HCLogAdapter) IsWarn() bool
- func (h *HCLogAdapter) Log(level hclog.Level, msg string, args ...interface{})
- func (h *HCLogAdapter) Name() string
- func (h *HCLogAdapter) Named(name string) hclog.Logger
- func (h *HCLogAdapter) ResetNamed(name string) hclog.Logger
- func (h *HCLogAdapter) SetLevel(level hclog.Level)
- func (h *HCLogAdapter) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger
- func (h *HCLogAdapter) StandardWriter(opts *hclog.StandardLoggerOptions) io.Writer
- func (h *HCLogAdapter) Trace(msg string, args ...interface{})
- func (h *HCLogAdapter) Warn(msg string, args ...interface{})
- func (h *HCLogAdapter) With(args ...interface{}) hclog.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HCLogAdapter ¶
type HCLogAdapter struct { Logger logrus.FieldLogger PrependName string Args []interface{} }
func (*HCLogAdapter) CreateEntry ¶
func (h *HCLogAdapter) CreateEntry(args []interface{}) *logrus.Entry
func (*HCLogAdapter) Debug ¶
func (h *HCLogAdapter) Debug(msg string, args ...interface{})
Emit a message and key/value pairs at the DEBUG level
func (*HCLogAdapter) Error ¶
func (h *HCLogAdapter) Error(msg string, args ...interface{})
Emit a message and key/value pairs at the ERROR level
func (*HCLogAdapter) ImpliedArgs ¶
func (h *HCLogAdapter) ImpliedArgs() []interface{}
ImpliedArgs returns With key/value pairs
func (*HCLogAdapter) Info ¶
func (h *HCLogAdapter) Info(msg string, args ...interface{})
Emit a message and key/value pairs at the INFO level
func (*HCLogAdapter) IsDebug ¶
func (h *HCLogAdapter) IsDebug() bool
Indicate if DEBUG logs would be emitted. This and the other Is* guards
func (*HCLogAdapter) IsError ¶
func (h *HCLogAdapter) IsError() bool
Indicate if ERROR logs would be emitted. This and the other Is* guards
func (*HCLogAdapter) IsInfo ¶
func (h *HCLogAdapter) IsInfo() bool
Indicate if INFO logs would be emitted. This and the other Is* guards
func (*HCLogAdapter) IsTrace ¶
func (h *HCLogAdapter) IsTrace() bool
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 (*HCLogAdapter) IsWarn ¶
func (h *HCLogAdapter) IsWarn() bool
Indicate if WARN logs would be emitted. This and the other Is* guards
func (*HCLogAdapter) Log ¶
func (h *HCLogAdapter) Log(level hclog.Level, msg string, args ...interface{})
func (*HCLogAdapter) Named ¶
func (h *HCLogAdapter) Named(name string) hclog.Logger
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 (*HCLogAdapter) ResetNamed ¶
func (h *HCLogAdapter) ResetNamed(name string) hclog.Logger
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 (*HCLogAdapter) SetLevel ¶
func (h *HCLogAdapter) 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 (*HCLogAdapter) StandardLogger ¶
func (h *HCLogAdapter) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger
Return a value that conforms to the stdlib log.Logger interface
func (*HCLogAdapter) StandardWriter ¶
func (h *HCLogAdapter) StandardWriter(opts *hclog.StandardLoggerOptions) io.Writer
Return a value that conforms to io.Writer, which can be passed into log.SetOutput()
func (*HCLogAdapter) Trace ¶
func (h *HCLogAdapter) Trace(msg string, args ...interface{})
Emit a message and key/value pairs at the TRACE level
func (*HCLogAdapter) Warn ¶
func (h *HCLogAdapter) Warn(msg string, args ...interface{})
Emit a message and key/value pairs at the WARN level
func (*HCLogAdapter) With ¶
func (h *HCLogAdapter) With(args ...interface{}) hclog.Logger
Creates a sublogger that will always have the given key/value pairs