Documentation ¶
Index ¶
- Constants
- type AsyncLogger
- type Factory
- func (f *Factory) CreateFailedLogger(destinationName string) logging.ObjectLogger
- func (f *Factory) CreateIncomingLogger(tokenID string, rotationMin int) logging.ObjectLogger
- func (f *Factory) CreateSQLQueryLogger(destinationName string) *logging.QueryLogger
- func (f *Factory) CreateStreamingArchiveLogger(destinationName string) logging.ObjectLogger
- func (f *Factory) CreateWriteAheadLogger() logging.ObjectLogger
- func (f *Factory) NewFactoryWithDDLLogsWriter(overriddenDDLLogsWriter io.Writer) *Factory
- func (f *Factory) NewFactoryWithQueryLogsWriter(overriddenQueryLogsWriter io.Writer) *Factory
- type SyncLogger
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 (*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 ¶
NewFactoryWithDDLLogsWriter returns a new factory instance with overridden DDL 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
Click to show internal directories.
Click to hide internal directories.