Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
hl(1)			     General Commands Manual			   hl(1)

NAME
     hl - JSON and logfmt log converter to human readable representation

SYNOPSIS
     hl   [--config]  [-s|--sort]  [-F|--follow]  [--tail]  [--sync-interval-ms]
     [--paging]   [-P	]   [-l|--level]   [--since]   [--until]   [-f|--filter]
     [-q|--query] [--color] [-c ] [--theme] [-r|--raw] [--no-raw] [--raw-fields]
     [-h|--hide]  [--flatten]  [-t|--time-format]  [-Z|--time-zone] [-L|--local]
     [--no-local]   [-e|--hide-empty-fields]   [-E|--show-empty-fields]   [--in-
     put-info]	[--ascii]  [-x|--expansion]  [-o|--output]  [--output-delimiter]
     [--input-format]  [--unix-timestamp-unit]	[--allow-prefix]   [--delimiter]
     [--interrupt-ignore-count]  [--buffer-size] [--max-message-size] [-C|--con-
     currency] [--shell-completions] [--man-page] [--list-themes] [--dump-index]
     [--help] [-V|--version] [FILE]

DESCRIPTION
     JSON and logfmt log converter to human readable representation

OPTIONS
     --config <FILE>
	    Configuration file path
	    May also be specified with the HL_CONFIG environment variable.

     -s, --sort
	    Sort entries chronologically

     -F, --follow
	    Follow input streams and sort entries  chronologically  within  time
	    frame set by --sync-interval-ms option

     --tail <N> [default: 10]
	    Number of last entries to preload from each file in --follow mode

     --sync-interval-ms <MILLISECONDS> [default: 100]
	    Synchronization interval for live streaming mode enabled by --follow
	    option

     --paging <WHEN> [default: auto]
	    Control pager usage (HL_PAGER or PAGER)

	    [possible values: auto, always, never]
	    May also be specified with the HL_PAGING environment variable.

     -P     Handful alias for --paging=never, overrides --paging option

     --help[=<VERBOSITY>]
	    Print help

	    [possible values: short, long]

     -V, --version
	    Print version

     [FILE]
	    Files to process

FILTERING OPTIONS
     -l, --level <LEVEL>
	    Display entries with level >= <LEVEL>
	    May also be specified with the HL_LEVEL environment variable.

     --since <TIME>
	    Display entries with timestamp >= <TIME>

	    Note that --time-zone and --local options are honored.

     --until <TIME>
	    Display entries with timestamp <= <TIME>

	    Note that --time-zone and --local options are honored.

     -f, --filter <FILTER>
	    Filter  entries  by matching field values [k=v, k~=v, k~~=v, 'k!=v',
	    'k?!=v', etc]

	    The format is <key> <operator> <value>.
	    The <key> is the field name to match.
	    The <value> is the string to match against (case-sensitive).

	    Operators:
	    ac	 = : perform exact string match
	    ac	~= : perform sub-string match
	    ac ~~= : perform regular expression match

	    Modifiers:
	    ac	 ! : negate the match (placed before operator) ['k!=v', 'k!~=v',
	    etc]
	    ac	 ? : include entry if the field is  missing  (placed  after  the
	    key) ['k?=v', 'k?!~=v', etc]

     -q, --query <QUERY>
	    Filter  entries  using  a  query  expression  ['status>=400 or dura-
	    tion>=15', etc]

	    Query expression supports all operators and modifiers from	--filter
	    and additionally
	    ac Logical: 'and', 'or', 'not' (aliases: '&&', '||', '!')
	    ac Comparison: '<', '>', '<=', '>=', '=', '!='
	    ac	Sets:  'status	in (500,503,504)', 'id in @ids.txt' (values from
	    file), 'id in @-' (values from stdin)
	    ac	Strings:  'message  contains  "timeout"'  (substring),	'message
	    matches "^Error.*timeout$"' (regular expression)
	    ac Existence: 'exists(user-id)', 'not exists(user-id)'
	    ac Grouping: '(status>=500 and status<=504) or (status==404)'

OUTPUT OPTIONS
     --color [<WHEN>] [default: auto]
	    Whether to use ANSI colors and styles

	    [possible values: auto, always, never]
	    May also be specified with the HL_COLOR environment variable.

     -c     Handful alias for --color=always, overrides --color option

     --theme <THEME> [default: uni]
	    Color theme

	    Run hl --list-themes to see available themes.
	    May also be specified with the HL_THEME environment variable.

     -r, --raw
	    Output raw source entries instead of formatted entries

	    This  can be useful for applying filters and saving results in their
	    original format.

     --no-raw
	    Disable raw source entries output, overrides --raw option

     --raw-fields
	    Output field values as is, without unescaping or prettifying

     -h, --hide <KEY>
	    Hide or reveal fields with the specified keys, prefix with ! to  re-
	    veal, provide '!*' to reveal all

     --flatten <WHEN> [default: always]
	    Whether to flatten objects

	    [possible values: never, always]
	    May also be specified with the HL_FLATTEN environment variable.

     -t, --time-format <FORMAT> [default: %Y-%m-%d %T.%3N]
	    Time format, see https://man7.org/linux/man-pages/man1/date.1.html
	    May also be specified with the HL_TIME_FORMAT environment variable.

     -Z, --time-zone <TZ> [default: UTC]
	    Time     zone     name,    see    column	"TZ    identifier"    at
	    https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

	    Examples:	'UTC',	 'America/New_York',	'Asia/Shanghai',    'Eu-
	    rope/Berlin', etc.
	    May also be specified with the HL_TIME_ZONE environment variable.

     -L, --local
	    Use local time zone, overrides --time-zone option

     --no-local
	    Disable local time zone, overrides --local option

     -e, --hide-empty-fields
	    Hide empty fields, applies for null, string, object and array fields
	    only
	    May  also  be  specified  with  the HL_HIDE_EMPTY_FIELDS environment
	    variable.

     -E, --show-empty-fields
	    Show empty fields, overrides --hide-empty-fields option
	    May also be  specified  with  the  HL_SHOW_EMPTY_FIELDS  environment
	    variable.

     --input-info <LAYOUTS> [default: auto]
	    Input number and filename layouts

	    [possible values: auto, none, minimal, compact, full]

     --ascii [<WHEN>] [default: auto]
	    Whether to restrict punctuation to ASCII characters only

	    When  enabled,  unicode  punctuation (like fancy quotes) will be re-
	    placed with ASCII equivalents.
	    The actual characters can be configured in the configuration file.

	    [possible values: auto, never, always]
	    May also be specified with the HL_ASCII environment variable.

     -x, --expansion [<MODE>] [default: auto]
	    Whether to expand fields and messages

	    Controls how large field values and messages are formatted.
	    Higher expansion levels will break up  long  content  into	multiple
	    lines.

	    [possible values: never, inline, auto, always]
	    May also be specified with the HL_EXPANSION environment variable.

     -o, --output <FILE>
	    Output file

     --output-delimiter <D> [default: newline]
	    Output entry delimiter

	    Possible values:
	    ac newline: Either lf or crlf, depends on the platform (default)
	    ac nul: Null character (\0)

	    [possible values: newline, nul]
	    May also be specified with the HL_OUTPUT_DELIMITER environment vari-
	    able.

INPUT OPTIONS
     --input-format <FORMAT> [default: auto]
	    Input format

	    [possible values: auto, json, logfmt]
	    May also be specified with the HL_INPUT_FORMAT environment variable.

     --unix-timestamp-unit <UNIT> [default: auto]
	    Unix timestamp unit

	    [possible values: auto, s, ms, us, ns]
	    May  also  be  specified with the HL_UNIX_TIMESTAMP_UNIT environment
	    variable.

     --allow-prefix
	    Allow non-JSON prefixes before JSON log entries
	    May also be specified with the HL_ALLOW_PREFIX environment variable.

     --delimiter <DELIMITER> [default: auto]
	    Log entry delimiter

	    By default, the delimiter is considered to be LF or CRLF followed by
	    an empty line or a line that
	    starts with a character other than '}', a space, or a tab.
	    This works well for most JSON and logfmt logs, including  series  of
	    pretty-printed JSON objects.

	    Possible values:
	    ac auto: Auto-select delimiter based on input format (default)
	    ac cr: Carriage return (\r)
	    ac lf: Line feed (\n)
	    ac crlf: Carriage return followed by line feed (\r\n)
	    ac newline: Either lf or crlf, whichever comes first
	    ac nul: Null character (\0)

	    [possible values: auto, cr, lf, crlf, newline, nul]
	    May also be specified with the HL_DELIMITER environment variable.

ADVANCED OPTIONS
     --interrupt-ignore-count <N> [default: 3]
	    Number of interrupts to ignore, i.e. Ctrl-C (SIGINT)
	    May also be specified with the HL_INTERRUPT_IGNORE_COUNT environment
	    variable.

     --buffer-size <SIZE> [default: 256 KiB]
	    Buffer size
	    May also be specified with the HL_BUFFER_SIZE environment variable.

     --max-message-size <SIZE> [default: 64 MiB]
	    Maximum log entry size
	    May also be specified with the HL_MAX_MESSAGE_SIZE environment vari-
	    able.

     -C, --concurrency <N>
	    Number of processing threads
	    May also be specified with the HL_CONCURRENCY environment variable.

     --shell-completions <SHELL>
	    Print shell auto-completion script and exit

	    [possible values: bash, elvish, fish, powershell, zsh]

     --man-page
	    Print man page and exit

     --list-themes[=<TAGS>]
	    Print available themes optionally filtered by tags

	    [possible  values:	dark, light, 16color, 256color, truecolor, over-
	    lay, base]

     --dump-index
	    Print debug index metadata (in --sort mode) and exit

VERSION
     v0.36.1

				    hl 0.36.1				   hl(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=hl&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help