Documentation ¶
Index ¶
Constants ¶
const (
TaskARNLabel = "com.amazonaws.ecs.task-arn"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory interface {
New(info dockerLogger.Info) (Logger, error)
}
Factory is an interface for creating new loggers
func NewLoggerFactory ¶
func NewLoggerFactory(typ LoggerType) Factory
NewLoggerFactory takes a log type and returns the appropriate factory
type JournaldLogger ¶
type JournaldLogger struct {
// contains filtered or unexported fields
}
JournaldLogger is a logger which sends logs to a local journald instance
func NewJournaldLogger ¶
func NewJournaldLogger(info dockerLogger.Info) *JournaldLogger
NewJournaldLogger creates a journald logger for a given container
func (*JournaldLogger) Log ¶
func (j *JournaldLogger) Log(line string) error
Log sends a log line to journald
type JournaldLoggerFactory ¶
type JournaldLoggerFactory struct {
// contains filtered or unexported fields
}
JournaldLoggerFactory is a factory for creating journald loggers
func NewJournaldLoggerFactory ¶
func NewJournaldLoggerFactory() *JournaldLoggerFactory
NewJournaldLoggerFactory creates a factory for creating journald loggers
func (*JournaldLoggerFactory) New ¶
func (j *JournaldLoggerFactory) New(info dockerLogger.Info) (Logger, error)
New creates a new JournaldLogger. It also caches loggers, returning an already allocated logger if one exists.
type LoggerType ¶
type LoggerType string
LoggerType specifies which type of downstream logger our handlers should create
const ( Journald LoggerType = "journald" Syslog LoggerType = "syslog" )
These are the available LoggerType's
type MockLogger ¶
type MockLogger struct {
Messages []string
}
func NewMockLogger ¶
func NewMockLogger() *MockLogger
func (*MockLogger) Log ¶
func (m *MockLogger) Log(line string) error
type MockLoggerFactory ¶
type MockLoggerFactory struct {
Loggers map[string]*MockLogger
}
func NewMockLoggerFactory ¶
func NewMockLoggerFactory() *MockLoggerFactory
func (*MockLoggerFactory) New ¶
func (m *MockLoggerFactory) New(info dockerLogger.Info) (Logger, error)