Documentation ¶
Overview ¶
Package file defines the logging file stream and file stream creation strategy to be integrated into the logging package stream factory instance.
Index ¶
Constants ¶
const ( // ID defines the application container registration string for the // file stream strategy. ID = stream.ID + ".file" // RotatingID defines the application container registration string for // the rotating file stream strategy. RotatingID = ID + "-rotating" )
const ( // RotatingType defines the value to be used to declare a // file Log stream type that rotates regarding the current date. RotatingType = "rotating-file" )
const ( // Type defines the value to be used to declare a // file Log stream type. Type = "file" )
Variables ¶
This section is empty.
Functions ¶
func NewRotatingWriter ¶
NewRotatingWriter generate a new rotating file writer instance.
Types ¶
type Provider ¶
type Provider struct{}
Provider defines the slate.config module service provider to be used on the application initialization to register the config service.
type RotatingStreamStrategy ¶
type RotatingStreamStrategy struct {
StreamStrategy
}
RotatingStreamStrategy define a new rotating file log stream generation strategy.
func NewRotatingStreamStrategy ¶
func NewRotatingStreamStrategy( fs afero.Fs, formatterFactory log.IFormatterFactory, ) (*RotatingStreamStrategy, error)
NewRotatingStreamStrategy generate a new rotating file log stream generation strategy.
type RotatingWriter ¶
type RotatingWriter struct {
// contains filtered or unexported fields
}
RotatingWriter defines an output writer used by a file stream that will use a dated file for target output.
func (*RotatingWriter) Close ¶
func (w *RotatingWriter) Close() error
Close satisfies the Closable interface.
type StreamStrategy ¶
type StreamStrategy struct {
// contains filtered or unexported fields
}
StreamStrategy defines a file log stream generation strategy.
func NewStreamStrategy ¶
func NewStreamStrategy( fs afero.Fs, formatterFactory log.IFormatterFactory, ) (*StreamStrategy, error)
NewStreamStrategy generates a new file log stream generation strategy instance.