tlog-rec(8) System Manager's Manual tlog-rec(8) NAME 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 systemwide 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 con‐ tents of the TLOG_REC_CONF_TEXT environment variable (if set), and then from command-line options. Parameters from each of these sources over‐ ride 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 --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", "warn‐ ing", "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 systemwide 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 speci‐ fied with TLOG_REC_CONF_FILE. FILES /usr/local/etc/tlog/tlog-rec.conf The systemwide 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) AUTHOR Nikolai Kondrashov Tlog February 2016 tlog-rec(8)