watch

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SEND_THRESHOLD   = 0
	INDENTATION_CHAR = byte('\t')
	NEWLINE          = "\n"
)

Variables

View Source
var (
	LogSendThreshold  int32 = 500
	TxIdTag                 = "@txid"
	AppLogCategory          = "AppLog"
	AppLogPattern, _        = regexp.Compile(`-- (\{.*\}) --`)
	DebugAppLogParser       = false
)

Functions

func ApplyAppLog

func ApplyAppLog(p *pack.LogSinkPack, line string) (ret bool)

Types

type DateFormatFile added in v0.3.2

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

func NewDateFormatFile added in v0.3.2

func NewDateFormatFile(fileName, curFileName string) *DateFormatFile

type WatchLog

type WatchLog struct {
	Id        string
	Activated bool

	FileName string
	FileInfo os.FileInfo
	FilePos  int64

	Words         []string
	CheckInterval int

	ExpirationTime int64
	LastCheckTime  int64

	Category string
	// contains filtered or unexported fields
}

func NewWatchLog

func NewWatchLog(id string) *WatchLog

func (*WatchLog) Activate

func (wl *WatchLog) Activate()

func (*WatchLog) ActivateFirst added in v0.3.2

func (wl *WatchLog) ActivateFirst()

func (*WatchLog) Config

func (wl *WatchLog) Config(id string, fileName string)

func (*WatchLog) IsActive

func (wl *WatchLog) IsActive() bool

func (*WatchLog) Process

func (wl *WatchLog) Process()

func (*WatchLog) Reset

func (wl *WatchLog) Reset()

func (*WatchLog) Stop

func (wl *WatchLog) Stop()

func (*WatchLog) String

func (wl *WatchLog) String() string

func (*WatchLog) ToString

func (wl *WatchLog) ToString() string

type WatchLogManager

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

func GetInstance

func GetInstance() *WatchLogManager

func (*WatchLogManager) Add added in v0.3.2

func (this *WatchLogManager) Add(id string, file string, category string, words []string, checkInterval int32) *WatchLog

func (*WatchLogManager) Run

func (this *WatchLogManager) Run()

Jump to

Keyboard shortcuts

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