tlog-rec man page

tlog-rec — start a shell and log terminal I/O

Synopsis

tlog-rec [OPTION...] [CMD_FILE [CMD_ARG...]]
tlog-rec -c [OPTION...] CMD_STRING [CMD_NAME [CMD_ARG...]]

Description

Tlog-rec is a terminal I/O logging program. It starts a shell under a pseudo-TTY, connects it to the actual terminal and logs whatever passes between them including user input, program output, and terminal window size changes.

If no "-c" option is specified, then the first non-option argument CMD_FILE specifies the location of a shell script the shell should read and the following arguments (CMD_ARG) specify its arguments.

If the "-c" option is specified, then a non-option argument CMD_STRING is required and should contain shell commands to execute, the following arguments can specify first the script name (CMD_NAME, i.e. argv[0]) and then its arguments (CMD_ARG).

If no non-option arguments are encountered, then the shell is started interactively.

Tlog-rec loads its parameters first from the system-wide configuration file /usr/local/etc/tlog/tlog-rec.conf, then from the file pointed at by TLOG_REC_CONF_FILE environment variable (if set), then from the contents of the TLOG_REC_CONF_TEXT environment variable (if set), and then from command-line options. Parameters from each of these sources override the previous one in turn.

Options

General options

-h, --help
Output a command-line usage message and exit
-s, --shell=SHELL
Spawn the specified SHELL
-l, --login
Make the shell a login shell
-c, --command
Execute shell commands
--notice=TEXT
Print TEXT message before starting recording
--latency=SECONDS

Cache captured data SECONDS seconds before logging

Value minimum: 1

--payload=BYTES

Limit encoded data to BYTES bytes

Value minimum: 32

-w, --writer=STRING

Use STRING log writer (syslog/file, default syslog)

Value should be one of: "syslog", "file"

Logged data set options

--log-input[=BOOL]
Enable/disable logging user input
--log-output[=BOOL]
Enable/disable logging program output
--log-window[=BOOL]
Enable/disable logging terminal window size changes

File writer options

--file-path=FILE
Log to FILE file

Syslog writer options

--syslog-facility=STRING

Log with STRING syslog facility

Value should be one of: "auth", "authpriv", "cron", "daemon", "ftp", "kern", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "lpr", "mail", "news", "syslog", "user", "uucp"

--syslog-priority=STRING

Log with STRING syslog priority

Value should be one of: "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"

Environment

TLOG_REC_CONF_FILE
Specifies the location of a configuration file to be read. The configuration parameters in this file override the ones in the system-wide configuration file /usr/local/etc/tlog/tlog-rec.conf.
TLOG_REC_CONF_TEXT
Specifies the configuration text to be read. The configuration parameters in this variable override the ones in the file specified with TLOG_REC_CONF_FILE.
TLOG_REC_SHELL
Specifies the shell to spawn. Overrides configuration specified with TLOG_REC_CONF_TEXT. Can be overridden with command-line options.

Files

/usr/local/etc/tlog/tlog-rec.conf
The system-wide configuration file

Examples

Start recording a login shell:
tlog-rec -l
Start recording a zsh session:
tlog-rec -s /usr/bin/zsh
Record everything but user input:
tlog-rec --log-input=off --log-output=on --log-window=on
Ask the recorded shell to execute a command:
tlog-rec -c whoami

See Also

tlog-rec.conf(5), tlog-play(8)

Author

Nikolai Kondrashov <spbnick@gmail.com>

Referenced By

tlog-play(8), tlog-rec.conf(5).

February 2016 Tlog