Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/pkg/logql/log/logfmt/parser.go

19 lines
282 B

package logfmt
import (
"strings"
)
func init() {
LogfmtExprErrorVerbose = true
}
func Parse(expr string, debug bool) ([]interface{}, error) {
s := NewScanner(strings.NewReader(expr), debug)
LogfmtExprParse(s)
if s.err != nil {
return nil, s.err
}
return s.data, nil
}