8000 GitHub - jigish/lq: simple command line tool to pretty print and filter logs
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jigish/lq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lq

simple command line tool to pretty print and filter logs. reads from stdin.

Installation

$ go install github.com/jigish/lq@latest

Usage

$ lq --help
lq is a simple log pretty printer and filter. reads from stdin.

Usage:
  lq [flags]

Flags:
  -e, --exclude strings                           do not print these extra fields
  -f, --format string                             incoming log line format: json, logfmt, or auto (default "auto")
  -h, --help                                      help for lq
  -i, --include strings                           only print these extra fields
      --level-field string                        level field name (default "level")
  -m, --match strings                             print log lines only when the given field string equals the given value. format: field=value
      --match-duration strings                    print log lines only when the given field duration equals the given value. format: field=value
      --match-duration-greater strings            print log lines only when the given field duration is greater than the given value. format: field>value
      --match-duration-greater-or-equal strings   print log lines only when the given field duration is greater than or equals the given value. format: field>=value
      --match-duration-less strings               print log lines only when the given field duration is less than the given value. format: field<value
      --match-duration-less-or-equal strings      print log lines only when the given field duration is less than or equals the given value. format: field<=value
      --match-float strings                       print log lines only when the given field float equals the given value. format: field=value
      --match-float-greater strings               print log lines only when the given field float is greater than the given value. format: field>value
      --match-float-greater-or-equal strings      print log lines only when the given field float is greater than or equals the given value. format: field>=value
      --match-float-less strings                  print log lines only when the given field float is less than the given value. format: field<value
      --match-float-less-or-equal strings         print log lines only when the given field float is less than or equals the given value. format: field<=value
      --match-int strings                         print log lines only when the given field int equals the given value. format: field=value
      --match-int-greater strings                 print log lines only when the given field int is greater than the given value. format: field>value
      --match-int-greater-or-equal strings        print log lines only when the given field int is greater than or equals the given value. format: field>=value
      --match-int-less strings                    print log lines only when the given field int is less than the given value. format: field<value
      --match-int-less-or-equal strings           print log lines only when the given field int is less than or equals the given value. format: field<=value
  -M, --match-regex strings                       print log lines only when the given field string regex matches the given value. format: field=value
      --match-time strings                        print log lines only when the given field time equals the given value. format: field=value
      --match-time-after strings                  print log lines only when the given field time is after the given value. format: field>value
      --match-time-after-or-equal strings         print log lines only when the given field time is after or equals the given value. format: field>=value
      --match-time-before strings                 print log lines only when the given field time is before the given value. format: field<value
      --match-time-before-or-equal strings        print log lines only when the given field time is before or equals the given value. format: field<=value
      --match-time-format string                  time format for --match-time* (see https://pkg.go.dev/time#pkg-constants) (default "2006-01-02T15:04:05.000Z07:00")
      --message-field string                      message field name (default "msg")
      --print-invalid-format                      print lines with invalid format
  -q, --quiet                                     quiet all internal error logging
      --timestamp-field string                    timestamp field name (default "ts")
      --timestamp-format string                   timestamp format (see https://pkg.go.dev/time#pkg-constants) (default "2006-01-02T15:04:05.000Z07:00")

Credits

lq is inspired by humanlog and leverages zerolog for pretty printing.

About

simple command line tool to pretty print and filter logs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0