logevents

package
v0.0.0-...-8aeb8a1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArchiveDir  = "archive"
	FailedDir   = "failed"
	IncomingDir = "incoming"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncLogger

type AsyncLogger struct {
	// contains filtered or unexported fields
}

AsyncLogger write json logs to file system in different goroutine

func NewAsyncLogger

func NewAsyncLogger(writer io.WriteCloser, showInGlobalLogger bool, poolSize int) *AsyncLogger

NewAsyncLogger creates AsyncLogger and run goroutine that's read from channel and write to file

func (*AsyncLogger) Close

func (al *AsyncLogger) Close() (resultErr error)

Close underlying log file writer

func (*AsyncLogger) Consume

func (al *AsyncLogger) Consume(event map[string]interface{}, tokenID string)

Consume gets event and puts it to channel

func (*AsyncLogger) ConsumeAny

func (al *AsyncLogger) ConsumeAny(object interface{})

ConsumeAny put interface{} to the channel

type Factory

type Factory struct {
	// contains filtered or unexported fields
}

func NewFactory

func NewFactory(logEventPath string, logRotationMin int64, showInServer bool, ddlLogsWriter io.Writer, queryLogsWriter io.Writer, asyncLoggers bool, asyncLoggerPoolSize int, compressFailed bool, compressArchive bool) *Factory

func (*Factory) CreateFailedLogger

func (f *Factory) CreateFailedLogger(destinationName string) logging.ObjectLogger

func (*Factory) CreateIncomingLogger

func (f *Factory) CreateIncomingLogger(tokenID string, rotationMin int) logging.ObjectLogger

func (*Factory) CreateSQLQueryLogger

func (f *Factory) CreateSQLQueryLogger(destinationName string) *logging.QueryLogger

func (*Factory) CreateStreamingArchiveLogger

func (f *Factory) CreateStreamingArchiveLogger(destinationName string) logging.ObjectLogger

func (*Factory) CreateWriteAheadLogger

func (f *Factory) CreateWriteAheadLogger() logging.ObjectLogger

func (*Factory) NewFactoryWithDDLLogsWriter

func (f *Factory) NewFactoryWithDDLLogsWriter(overriddenDDLLogsWriter io.Writer) *Factory

NewFactoryWithDDLLogsWriter returns a new factory instance with overridden DDL debug logs writer

func (*Factory) NewFactoryWithQueryLogsWriter

func (f *Factory) NewFactoryWithQueryLogsWriter(overriddenQueryLogsWriter io.Writer) *Factory

NewFactoryWithQueryLogsWriter returns a new factory instance with overridden sql query debug logs writer

type SyncLogger

type SyncLogger struct {
	// contains filtered or unexported fields
}

SyncLogger writes json logs to file system immediately

func NewSyncLogger

func NewSyncLogger(writer io.WriteCloser, showInGlobalLogger bool) *SyncLogger

NewSyncLogger creates configured SyncLogger

func (*SyncLogger) Close

func (sl *SyncLogger) Close() (resultErr error)

Close underlying log file writer

func (*SyncLogger) Consume

func (sl *SyncLogger) Consume(event map[string]interface{}, tokenID string)

Consume uses write func

func (*SyncLogger) ConsumeAny

func (sl *SyncLogger) ConsumeAny(object interface{})

ConsumeAny uses write func

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL