Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func FormatDuration ¶
FormatDuration dynamically chooses the best unit for logging.
Types ¶
type Client ¶
type Client interface {
Blackbox
contract.LogOperator
contract.ComponentExtractor
}
func NewClient ¶
func NewClient(out io.Writer, l contract.Level, d Dependencies, opts ClientOptions) (Client, error)
type ClientOption ¶
type ClientOption func(*ClientOptions)
func WithLevelKey ¶
func WithLevelKey(x Key) ClientOption
func WithMaxLen ¶
func WithMaxLen(x uint) ClientOption
func WithMessageKey ¶
func WithMessageKey(x Key) ClientOption
func WithTimeKey ¶
func WithTimeKey(x Key) ClientOption
type ClientOptions ¶
func ApplyClientOptions ¶
func ApplyClientOptions(opts *ClientOptions, modifiers ...ClientOption) ClientOptions
type DefaultTool ¶ added in v0.1.11
type DefaultTool struct {
Client Client
}
func NewTool ¶
func NewTool(c Client) (*DefaultTool, error)
func (*DefaultTool) GetComponent ¶ added in v0.1.11
func (d *DefaultTool) GetComponent(skip int, withFullFn, withFile, withFilePath, withLine bool) string
GetComponent returns a component string.
type Dependencies ¶ added in v0.1.8
type Dependencies struct {
M contract.Marshaler
U contract.Unmarshaler
}
type Tool ¶ added in v0.1.245
type Tool interface {
contract.LogOperator
contract.ComponentExtractor
}
Click to show internal directories.
Click to hide internal directories.