= tspin(1)
:doctype: manpage
:manmanual: tailspin
:man source: tailspin {release-version}
:revdate: {docdate}

ifdef::env-github[]
:toc:
:toc-title:
:toc-placement!:
:numbered:
endif::[]

== NAME

tspin - A log file highlighter

== SYNOPSIS

*tspin* [_OPTION_]... [_FILE_]...

== DESCRIPTION

tailspin is a command line tool that highlights log files.

== OPTIONS

_-f, --follow_::
Follow (tail) the contents of the file.
Always true when using the _--exec_ flag.

_-p, --print_::
Print the output to stdout instead of viewing the contents in the pager _less_.
Always true if using stdin.

_--config-path_ *CONFIG_PATH*::
Specify the path to a custom configuration file.
Defaults to *XDG_CONFIG_HOME/tailspin/theme.toml* or *~/.config/tailspin/theme.toml* if not set.

_-e, --exec_ *COMMAND*::
Run command and view the output in a pager.
The command traps the interrupt signal to allow for cancelling and resuming follow mode while inside _less_.

+
.Example:
----
tspin --exec 'kubectl logs -f pod_name'
----

_--highlight_ *COLOR1*:__word1,word2,...__ *COLOR2*:__word3,word4,...__::
Highlight the provided comma-separated words in the specified color.
Possible colors are red, green, yellow, blue, magenta, and cyan.

+
.Example:
----
tspin logfile.txt --highlight red:error,fail --highlight green:success,ok
----

_--enable=[HIGHLIGHT_GROUP]_::
Disable all highlighting groups except the ones specified.
Comma separated list of groups.
Cannot be used with *--disable=[HIGHLIGHT_GROUP]*.
Possible groups: numbers, urls, emails, pointers, dates, paths, quotes, key-value-pairs, uuids, ipv4, processes, json.

_--disable=[HIGHLIGHT_GROUP]_::
Disable the specified highlighting groups.
Comma separated list of groups.
Cannot be used with *--enable=[HIGHLIGHT_GROUP]*.
Possible groups: numbers, urls, emails, pointers, dates, paths, quotes, key-value-pairs, uuids, ipv4, processes, json.

_--extras=[EXTRA]_::
Enable extra highlighters.
Comma separated list of extras.
Possible values: ipv6, jvm-stack-trace.
Can also be set via the _TAILSPIN_EXTRAS_ environment variable.

_--pager_ *COMMAND*::
Override the default pager command used by tspin.
The command must include the string _[FILE]_ which will be replaced with the file path internally.

+
.Example:
----
tspin logfile.txt --pager "ov -f [FILE]"
----

_--disable-builtin-keywords_::
Disables the highlighting of all builtin keyword groups (booleans, nulls, log severities and common REST verbs).

== ENVIRONMENT VARIABLES

*TAILSPIN_PAGER*::
Set the _TAILSPIN_PAGER_ environment variable to override the default pager.
Equivalent to the *--pager* flag.
The command must include the string _[FILE]_ which will be replaced with the file path internally.
For example, _"ov -f [FILE]"_.

*TAILSPIN_EXTRAS*::
Comma separated list of extras to enable by default.
Equivalent to the *--extras* flag.
For example, _"jvm-stack-trace"_ or _"ipv6,jvm-stack-trace"_.

== SEE ALSO

*less*(1), *tail*(1)

== About

Ben Sadeh (github.com/bensadeh/tailspin)

Released under the MIT License
