Documentation
¶
Index ¶
- Constants
- type Item
- type ItemType
- type LevelType
- type LogItem
- func (l *LogItem) AppendContent(content []byte) error
- func (l *LogItem) GetComponent() string
- func (l *LogItem) GetContent() []byte
- func (l *LogItem) GetFileName() string
- func (l *LogItem) GetHost() string
- func (l *LogItem) GetLevel() LevelType
- func (l *LogItem) GetPort() string
- func (l *LogItem) GetTime() time.Time
Constants ¶
View Source
const MaxLogSize = 1024 * 1024
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item interface { // The host which produce the log GetHost() string // The service produced the log listening on GetPort() string // The component produced the log. eg. pd, tidb, tikv. GetComponent() string // The log file name GetFileName() string // The time when the log produced GetTime() time.Time // The log level GetLevel() LevelType // The whole log content GetContent() []byte // Append log content AppendContent([]byte) error }
Item represent a log entity
type LogItem ¶
type LogItem struct { File string // name of log file Time time.Time // timestamp of a single line log Level LevelType // log level Host string // host ip Port string // port of component Component string // name of component Content []byte // content of a entire line log Type ItemType // type of log file }
The LogItem struct implements Item interface
func (*LogItem) AppendContent ¶
func (*LogItem) GetComponent ¶
func (*LogItem) GetContent ¶
func (*LogItem) GetFileName ¶
Click to show internal directories.
Click to hide internal directories.