tlog-rec-session.conf(5)

πŸ“¦
version 14 Β· 2 versions
, in centos-stream 10, centos-stream 9, fedora 43, fedora 44, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– tlog-rec-session.conf β€” the manual page, but make it a group chat πŸ’–

okay so bestie, this is the man page for tlog-rec-session.conf(5) β€” it lives in the File Formats Manual section, and it's genuinely one of my faves. let's get into it 🫢


✨ NAME ✨

tlog-rec-session.conf β€” the config file for tlog-rec-session, periodt.


🌸 DESCRIPTION 🌸

so tlog-rec-session.conf is a JSON-format configuration file for the tlog-rec-session program. and here's the iconic part β€” contrary to the strict JSON specification, both C and C++ style comments are allowed in the file. yes bestie, you can leave notes. we love a flexible king πŸ’…

the file must contain a single JSON object with the objects and fields described below. almost all of them are optional and assume a default value. however β€” and this is the lowkey important bit β€” those that do require a value can still be omitted, and specified to tlog-rec-session in other ways: through environment variables or command line. so you're never truly stuck πŸ’–


πŸŽ€ OBJECTS AND FIELDS πŸŽ€

πŸ‘‘ Root object

  • shell (string) β€” the path to the shell executable which should be spawned.
    • Default: "/bin/bash"
  • notice (string) β€” a message which will be printed before starting recording and the user shell. can be used to warn the user that the session is recorded. (aka the "hey bestie you're being watched" note ✨)
    • Default: "\nATTENTION! Your session is being recorded!\n\n"
  • latency (integer) β€” 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.
    • Minimum: 1
    • Default: 10
  • payload (integer) β€” the maximum encoded data (payload) size per message, in bytes. as soon as payload exceeds this number of bytes, it is formatted into a message and logged.
    • Minimum: 32
    • Default: 2048
  • log (object) β€” logged data set object, see below.
  • limit (object) β€” logging limit object, see below.
  • file (object) β€” file writer object, see below.
  • syslog (object) β€” syslog writer object, see below.
  • journal (object) β€” journal writer object, see below.
  • writer (string) β€” the type of "log writer" to use for logging. the writer needs to be configured using its dedicated parameters. iykyk πŸ‘€
    • One of: "journal", "syslog", "file"
    • Default: "journal"

πŸ¦‹ log β€” Logged data set object

  • input (boolean) β€” if true, user input is logged.
    • Default: false
  • output (boolean) β€” if true, terminal output is logged.
    • Default: true
  • window (boolean) β€” if true, terminal window size changes are logged.
    • Default: true

πŸ”₯ limit β€” Logging limit object

  • rate (integer) β€” the maximum rate messages could be logged at, in bytes/sec.
    • Minimum: 0
    • Default: 16384
  • burst (integer) β€” the number of bytes by which logged messages are allowed to exceed the rate limit momentarily, i.e. "burstiness".
    • Minimum: 0
    • Default: 32768
  • action (string) β€” 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. (rip to those messages 😭)
    • One of: "pass", "delay", "drop"
    • Default: "pass"

πŸ“ file β€” File writer object

  • path (string) β€” the "file" writer log file path.
    • No default. (ngl, you gotta give this one a value)

🌈 syslog β€” Syslog writer object

  • facility (string) β€” the syslog facility the "syslog" writer should use for messages.
    • One of: "auth", "authpriv", "cron", "daemon", "ftp", "kern", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "lpr", "mail", "news", "syslog", "user", "uucp"
    • Default: "authpriv"
  • priority (string) β€” the syslog priority the "syslog" writer should use for messages.
    • One of: "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"
    • Default: "info"

🧚 journal β€” Journal writer object

  • priority (string) β€” the syslog-style priority the "journal" writer should use for messages.
    • One of: "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"
    • Default: "info"
  • augment (boolean) β€” if 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. it's giving ✨remapping✨
    • Default: true

πŸ’… EXAMPLES πŸ’…

a configuration specifying only a shell:

{
    "shell": "/usr/bin/zsh"
}

a configuration enabling logging user input:

{
    "log": {
        "input": true
    }
}

a configuration specifying logging to a file:

{
    "writer": "file",
    "file" : {
        "path": "/var/log/tlog-rec-session.log"
    }
}

πŸ‘€ SEE ALSO πŸ‘€

tlog-rec-session(8), http://json.org/


πŸ’œ AUTHOR πŸ’œ

Nikolai Kondrashov <spbnick@gmail.com>


and that's the whole vibe check bestie β€” this page is brought to you by Tlog, dated February 2016. slay, no cap, go configure something iconic πŸ’–βœ¨πŸŽ€πŸ¦‹