Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseLogLevel ¶ added in v1.12.3
ParseLogLevel returns the hclog.Level that corresponds with the provided level string. This differs hclog.LevelFromString in that it supports additional level strings.
Types ¶
type LogConfig ¶ added in v1.12.3
type LogConfig struct {
// Name is the name the returned logger will use to prefix log lines.
Name string
// LogLevel is the minimum level to be logged.
LogLevel hclog.Level
// LogFormat is the log format to use, supported formats are 'standard' and 'json'.
LogFormat LogFormat
// LogFilePath is the path to write the logs to the user specified file.
LogFilePath string
// LogRotateDuration is the user specified time to rotate logs
LogRotateDuration time.Duration
// LogRotateBytes is the user specified byte limit to rotate logs
LogRotateBytes int
// LogRotateMaxFiles is the maximum number of past archived log files to keep
LogRotateMaxFiles int
// DefaultFileName should be set to the value to be used if the LogFilePath
// ends in a path separator such as '/var/log/'
// Examples of the default name are as follows: 'vault', 'agent' or 'proxy.
// The creator of this struct *must* ensure that it is assigned before doing
// anything with LogConfig!
DefaultFileName string
}
LogConfig should be used to supply configuration when creating a new Vault logger
func NewLogConfig ¶ added in v1.12.3
NewLogConfig should be used to initialize the LogConfig struct.
type LogFormat ¶ added in v1.12.3
type LogFormat int
func ParseLogFormat ¶ added in v1.12.3
ParseLogFormat parses the log format from the provided string.
Click to show internal directories.
Click to hide internal directories.