logsink

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LastLog   int64 = time.Now().UnixMilli()
	LastAlert int64 = time.Now().UnixMilli()
)

Functions

func AddTruncatedTag

func AddTruncatedTag(lineLog *LineLog)

func AlertLogTruncated

func AlertLogTruncated(message string)

func CheckLogContent

func CheckLogContent(lineLog *LineLog, orgContent string)

func CreateLogMessage

func CreateLogMessage(lineLog *LineLog) string

func Log

func Log(lineLog *LineLog)

func LogStr

func LogStr(message string)

func Send

func Send(alog *LineLog)

Types

type LineBuffer

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

func NewLineBuffer

func NewLineBuffer() *LineBuffer

func (*LineBuffer) Append

func (this *LineBuffer) Append(line string) []string

func (*LineBuffer) AppendLine

func (this *LineBuffer) AppendLine(line string) []string

func (*LineBuffer) Flush

func (this *LineBuffer) Flush() string

type LineLog

type LineLog struct {
	Truncated        bool
	OrgContentLength int
	Time             int64
	Category         string
	Tags             *value.MapValue
	Fields           *value.MapValue
	Content          string
}

func NewLineLog

func NewLineLog() *LineLog

func (*LineLog) String

func (this *LineLog) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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