Documentation ¶
Index ¶
Constants ¶
View Source
const (
// ModuleName is the name used in config file
ModuleName = "file"
)
Variables ¶
View Source
var ( ErrorNoPath = errutil.NewFactory("no path defined for output file") ErrorInvalidWriteBehavior = errutil.NewFactory("invalid write_behavior defined: %s") ErrorInvalidFileMode = errutil.NewFactory("invalid file_mode: %s") ErrorInvalidDirMode = errutil.NewFactory("invalid dir_mode: %s") ErrorCreatingDir = errutil.NewFactory("error creating directory: %s") )
errors
Functions ¶
Types ¶
type OutputConfig ¶
type OutputConfig struct { config.OutputConfig CreateIfDeleted bool `json:"create_if_deleted"` // If the configured file is deleted, but an event is handled by the plugin, the plugin will recreate the file. Default ⇒ true DirMode string `json:"dir_mode"` // Dir access mode to use. Example: "dir_mode" => 0750 FileMode string `json:"file_mode"` // File access mode to use. Example: "file_mode" => 0640 FlushInterval int `json:"flush_interval"` // Flush interval (in seconds) for flushing writes to log files. 0 will flush on every message. DiscardTime int `json:"discard_time"` // Time (in seconds) for discarding messages before retrying to write to file IdleTimeout int `json:"idle_timeout"` // Time (in seconds) without new messages before closing file and releasing resources. 0 will disable timeout. Path string `json:"path"` // The path to the file to write. Event fields can be used here, like /var/log/logstash/%{host}/%{application} Codec string `json:"codec"` // expression to write to file. E.g. "%{log}" WriteBehavior string `json:"write_behavior"` // If append, the file will be opened for appending and each new event will be written at the end of the file. If overwrite, the file will be truncated before writing and only the most recent event will appear in the file. // contains filtered or unexported fields }
OutputConfig holds the configuration json fields and internal objects
func DefaultOutputConfig ¶
func DefaultOutputConfig() OutputConfig
DefaultOutputConfig returns an OutputConfig struct with default values
Directories ¶
Path | Synopsis |
---|---|
Package mock_filesystem is a generated GoMock package.
|
Package mock_filesystem is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.