Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Parser ¶
type Parser struct { // Fields contains the parsed JSON line after Parse() call // // The Fields are valid until the next call to ParseLogMessage() // or until the parser is returned to the pool with PutParser() call. Fields []logstorage.Field // contains filtered or unexported fields }
Parser parses a single JSON log message into Fields.
See https://docs.victoriametrics.com/VictoriaLogs/keyConcepts.html#data-model
Use GetParser() for obtaining the parser.
func GetParser ¶
func GetParser() *Parser
GetParser returns Parser ready to parse JSON lines.
Return the parser to the pool when it is no longer needed by calling PutParser().
func (*Parser) ParseLogMessage ¶
ParseLogMessage parses the given JSON log message msg into p.Fields.
The p.Fields remains valid until the next call to ParseLogMessage() or PutParser().
func (*Parser) RenameField ¶
RenameField renames field with the oldName to newName in p.Fields
Click to show internal directories.
Click to hide internal directories.