tlog-rec(8)
π tlog-rec β bestie's guide to recording terminal I/O π
okay so. this is tlog-rec, from section 8 of the System Manager's Manual β the tlog-rec(8) page, if we're being official about it. and babes, it is literally the program that records what happens in your terminal. no cap.
β¨ NAME β¨
tlog-rec β record terminal I/O of a program or a user shell π
πΈ SYNOPSIS πΈ
tlog-rec [OPTION...] [CMD_FILE [CMD_ARG...]]
π¦ DESCRIPTION π¦
tlog-rec is a terminal I/O logging program. it starts a program under a pseudo-TTY, connects it to your actual terminal, and logs everything that passes between them β user input, program output, and terminal window size changes. it's giving surveillance but make it cozy. π
So, CMD_FILE is the argument that tells it which program to run and record. here's the vibe check on how it finds that program:
- if
CMD_FILEcontains a slash (/) character, then it's assumed to contain a path to the program to run. easy. - otherwise, a program file with the
CMD_FILEname is searched for in directories specified with thePATHenvironment variable. - and if
PATHis not set? then the current directory is searched, followed by the system-default directories output bygetconf CS_PATH, which is usually/bin:/usr/bin.
CMD_ARG arguments are used as arguments to the program to run and record. so like, they get passed along. bestie behavior. π«Ά
If no non-option arguments are specified, then tlog-rec starts and records a user shell specified with the SHELL environment variable, or if that's not set, it starts the shell specified in the NSS database for the user tlog-rec runs as. it will find you a shell. it's <em>that</em> friend. π
Now here's the important config part β the way it loads parameters, in order, and each one overrides the last:
- first from the system-wide configuration file
/etc/tlog/tlog-rec.conf - then from the file pointed at by the
TLOG_REC_CONF_FILEenvironment variable (if set) - then from the contents of the
TLOG_REC_CONF_TEXTenvironment variable (if set) - and then from command-line options
Parameters from each of these sources override the previous one in turn. periodt. π
β¨ OPTIONS β¨
π General options
-h,--helpβ Output a command-line usage message and exit.-v,--versionβ Output version information and exit.--configurationβ Output program configuration in JSON and exit.--latency=SECONDSβ Cache captured dataSECONDSseconds before logging.
SECONDS is the number of seconds to cache captured data for before logging. The encoded data which does not reach payload size stays in memory and is not logged until this number of seconds elapses.
Value minimum: 1
--payload=BYTESβ Limit encoded data toBYTESbytes.
BYTES is the maximum encoded data (payload) size per message, bytes. As soon as payload exceeds this number of bytes, it is formatted into a message and logged.
Value minimum: 32
-w,--writer=STRINGβ UseSTRINGlog writer (journal/syslog/file, defaultfile).
STRING is the type of "log writer" to use for logging. The writer needs to be configured using its dedicated parameters.
Value should be one of:"journal","syslog","file"
--semaphore=FILEβ Write"READY"toFILEwhen recording is setup.
FILE is a path to a "semaphore" file to write string "READY" to, when the recording setup is done, and I/O can be passed to and from the recorded program.
π Logged data set options
--log-input[=BOOL]β Enable/disable logging user input.
If specified as true, user input is logged.
--log-output[=BOOL]β Enable/disable logging program output.
If specified as true, terminal output is logged.
--log-window[=BOOL]β Enable/disable logging terminal window size changes.
If specified as true, terminal window size changes are logged.
π₯ Logging limit options
--limit-rate=NUMBERβ Set logging rate limit toNUMBERof message bytes/sec.
NUMBER is the maximum rate messages could be logged at, bytes/sec.
Value minimum: 0
--limit-burst=NUMBERβ Set logging burst limit toNUMBERof message bytes.
NUMBER is the number of bytes by which logged messages are allowed to exceed the rate limit momentarily, i.e. "burstiness".
Value minimum: 0
--limit-action=STRINGβ PerformSTRINGaction above limits (pass/delay/drop).
STRING is the logging limit action. If set to "pass" no logging limits will be applied. If set to "delay", logging will be throttled. If set to "drop", messages exceeding limits will be dropped.
Value should be one of:"pass","delay","drop"
π File writer options
-o,--file-path=FILEβ Log toFILEfile.
FILE is the "file" writer log file path.
π Syslog writer options
--syslog-facility=STRINGβ Log withSTRINGsyslog facility.
STRING is the syslog facility "syslog" writer should use for messages.
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 withSTRINGsyslog priority.
STRING is the syslog priority "syslog" writer should use for messages.
Value should be one of:"emerg","alert","crit","err","warning","notice","info","debug"
π Journal writer options
--journal-priority=STRINGβ Log withSTRINGsyslog-style priority.
STRING is the syslog-style priority "journal" writer should use for messages.
Value should be one of:"emerg","alert","crit","err","warning","notice","info","debug"
--journal-augment[=BOOL]β Enable/disable adding extra journal fields.
If specified as true, the "journal" writer copies the following JSON fields to Journal fields: user -> TLOG_USER, session -> TLOG_SESSION, rec -> TLOG_REC, and id -> TLOG_ID.
π 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/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 withTLOG_REC_CONF_FILE.SHELLβ Specifies the shell to run, if no positional arguments are found on the command line.
π§ FILES π§
/etc/tlog/tlog-rec.confβ The system-wide configuration file
π EXAMPLES π
Record a vim session to a file:
tlog-rec -o vim.log vim
Record user input only:
tlog-rec --log-input=on --log-output=off --log-window=off
Record with minimal latency:
tlog-rec --latency=1
π«Ά SEE ALSO π«Ά
tlog-rec.conf(5), tlog-rec-session(8), tlog-play(8)
β AUTHOR β
Nikolai Kondrashov <spbnick@gmail.com>
and that's the whole page bestie π tlog, May 2017 β the tlog-rec(8) era. go forth and record responsibly. πβ¨π¦
π¦ where this page comes from
- centos-stream 10: tlog 14-4.el10 Β· GPL-2.0-or-later
- centos-stream 9: tlog 14-1.el9 Β· GPLv2+
- centos-stream 9: tlog 14-1.el9 Β· GPLv2+
- debian bookworm: tlog 12.1-2 Β· GPL-2.0-or-later
- fedora 43: tlog 14-6.fc43 Β· GPL-2.0-or-later
- fedora 43: tlog 14-6.fc43 Β· GPL-2.0-or-later
- fedora 44: tlog 14-7.fc44 Β· GPL-2.0-or-later
- fedora 44: tlog 14-7.fc44 Β· GPL-2.0-or-later
- ubuntu jammy: tlog 12-1 Β· GPL-2.0-or-later
- ubuntu noble: tlog 14-1build2 Β· GPL-2.0-or-later
- ubuntu questing: tlog 14-2
- ubuntu resolute: tlog 14-2.1 Β· GPL-2.0-or-later
- ubuntu stonking: tlog 14-3 Β· GPL-2.0-or-later
- Copyright (C) 2016-2017 Red Hat
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms