Documentation ¶
Index ¶
- Constants
- func AddFlags(flagSet *flag.FlagSet)
- func New(component string) (lager.Logger, *lager.ReconfigurableSink)
- func NewFromConfig(component string, config LagerConfig) (lager.Logger, *lager.ReconfigurableSink)
- func NewFromSink(component string, sink lager.Sink) (lager.Logger, *lager.ReconfigurableSink)
- type LagerConfig
- type RedactPatterns
- type TimeFormat
Constants ¶
View Source
const ( DEBUG = "debug" INFO = "info" ERROR = "error" FATAL = "fatal" )
Variables ¶
This section is empty.
Functions ¶
func NewFromConfig ¶
func NewFromConfig(component string, config LagerConfig) (lager.Logger, *lager.ReconfigurableSink)
func NewFromSink ¶
func NewFromSink(component string, sink lager.Sink) (lager.Logger, *lager.ReconfigurableSink)
Types ¶
type LagerConfig ¶
type LagerConfig struct { LogLevel string `json:"log_level,omitempty"` RedactSecrets bool `json:"redact_secrets,omitempty"` RedactPatterns []string `json:"redact_patterns,omitempty"` TimeFormat TimeFormat `json:"time_format"` MaxDataStringLength int `json:"max_data_string_length"` }
func ConfigFromFlags ¶
func ConfigFromFlags() LagerConfig
func DefaultLagerConfig ¶
func DefaultLagerConfig() LagerConfig
type RedactPatterns ¶
type RedactPatterns []string
func (*RedactPatterns) Set ¶
func (p *RedactPatterns) Set(value string) error
func (*RedactPatterns) String ¶
func (p *RedactPatterns) String() string
type TimeFormat ¶
type TimeFormat int
const ( FormatUnixEpoch TimeFormat = iota FormatRFC3339 )
func (TimeFormat) Get ¶
func (t TimeFormat) Get(s string) interface{}
Set implements the flag.Getter interface
func (TimeFormat) MarshalJSON ¶
func (t TimeFormat) MarshalJSON() ([]byte, error)
func (*TimeFormat) Set ¶
func (t *TimeFormat) Set(s string) error
Set implements the flag.Value interface
func (TimeFormat) String ¶
func (t TimeFormat) String() string
func (*TimeFormat) UnmarshalJSON ¶
func (t *TimeFormat) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.