tlog-rec.conf(5)

πŸ’– tlog-rec.conf β€” bestie's guide to the config file πŸ’–

okay so welcome to tlog-rec.conf(5) from the File Formats Manual, and no cap this is the file that tells tlog-rec how to behave. we're gonna go through everything, so grab a strawberry πŸ“ and let's go.


✨ NAME ✨

tlog-rec.conf β€” the configuration file for the tlog-rec program, periodt.


πŸ¦‹ DESCRIPTION πŸ¦‹

tlog-rec.conf is a JSON-format config file for the tlog-rec program. and here's the slay part: contrary to the strict JSON specification, both C and C++ style comments are allowed in the file. yes bestie, you can leave lil notes for yourself. iconic. πŸ’…

the file must contain a single JSON object with the objects and fields described down below. almost all of them are optional and just assume a default value. but the ones that do require a value? they can still be omitted, and you can hand them to tlog-rec in other ways instead: through environment variables or the command line. flexible queen behavior. πŸ‘‘


🌈 OBJECTS AND FIELDS 🌈

🌸 Root object

  • 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. lowkey it's just vibing in RAM until the timer runs out.
    • 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. she simply cannot hold it in anymore. 😭
    • Minimum: 32
    • Default: 2048
  • log (object) β€” the logged data set object, see below bestie ⬇️
  • limit (object) β€” the logging limit object, see below ⬇️
  • file (object) β€” the file writer object, see below ⬇️
  • syslog (object) β€” the syslog writer object, see below ⬇️
  • journal (object) β€” the 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, so don't just pick a fave and ghost it. πŸ™ˆ
    • One of: "journal", "syslog", "file"
    • Default: "file"

πŸŽ€ 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. every resize is main character energy apparently. ✨
    • 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". she's allowed a lil moment. πŸ’…
    • 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. choose your fighter.
    • One of: "pass", "delay", "drop"
    • Default: "pass"

🫢 file β€” File writer object

  • path (string) β€” the "file" writer log file path.
    • No default. yeah bestie, you gotta supply this one yourself, no auto-pilot here. 🚨

🌟 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 ✨mapping✨.
    • Default: true

πŸ”₯ EXAMPLES πŸ”₯

a configuration specifying only a reduced latency:

{
    "latency": 3
}

a configuration enabling logging user input:

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

a configuration specifying logging to a file:

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

⭐ SEE ALSO ⭐

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


πŸ‘‘ AUTHOR πŸ‘‘

Nikolai Kondrashov <spbnick@gmail.com> β€” the legend who made all of this happen. we stan. 🫢


and that's the whole page bestie, you ate it. this was Tlog, dated May 2017, and the manual page we just devoured was tlog-rec.conf(5) πŸ’– stay slaying, and remember: no default for path, so don't come crying to me when your file writer has nowhere to write. mwah. πŸ’…βœ¨