Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Set ¶
func Set(configuration *Configuration)
Set configures the logger with the given configuration.
Types ¶
type Configuration ¶
type Configuration struct { // Output location of the logger. // Can be either a path relative to the configuration directory, STDOUT or STDERR. Output string `json:"output"` // Level from which on the entries are logged. Level logrus.Level `json:"level"` }
Configuration serializes and deserializes the logging parameters.
func (Configuration) MarshalJSON ¶
func (configuration Configuration) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*Configuration) UnmarshalJSON ¶
func (configuration *Configuration) UnmarshalJSON(bytes []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Logger ¶
Logger adds a method to the logrus logger.
func Get ¶
func Get() *Logger
Get returns the configured logger or a new one based on the configuration file.
func NewLogger ¶
func NewLogger(configuration *Configuration) *Logger
NewLogger returns a new logger based on the given configuration.
Click to show internal directories.
Click to hide internal directories.