tlog-rec man page

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


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


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.


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
Print TEXT message before starting recording

Cache captured data SECONDS seconds before logging

Value minimum: 1


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

Enable/disable logging user input
Enable/disable logging program output
Enable/disable logging terminal window size changes

File writer options

Log to FILE file

Syslog writer options


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"


Log with STRING syslog priority

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


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.
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.
Specifies the shell to spawn. Overrides configuration specified with TLOG_REC_CONF_TEXT. Can be overridden with command-line options.


The system-wide configuration file


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)


Nikolai Kondrashov <spbnick@gmail.com>

Referenced By

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

Explore man page connections for tlog-rec(8).

Tlog February 2016