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 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 ¶
Types ¶
type LagerConfig ¶
type LagerConfig struct { LogLevel string `json:"log_level,omitempty"` RedactSecrets bool `json:"redact_secrets,omitempty"` TimeFormat TimeFormat `json:"time_format"` }
func ConfigFromFlags ¶
func ConfigFromFlags() LagerConfig
func DefaultLagerConfig ¶
func DefaultLagerConfig() LagerConfig
type TimeFormat ¶ added in v1.1.0
type TimeFormat int
const ( FormatUnixEpoch TimeFormat = iota FormatRFC3339 )
func (TimeFormat) Get ¶ added in v1.1.0
func (t TimeFormat) Get(s string) interface{}
Set implements the flag.Getter interface
func (TimeFormat) MarshalJSON ¶ added in v1.1.0
func (t TimeFormat) MarshalJSON() ([]byte, error)
func (*TimeFormat) Set ¶ added in v1.1.0
func (t *TimeFormat) Set(s string) error
Set implements the flag.Value interface
func (TimeFormat) String ¶ added in v1.1.0
func (t TimeFormat) String() string
func (*TimeFormat) UnmarshalJSON ¶ added in v1.1.0
func (t *TimeFormat) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.