From 8c50d9833f088b6a6daa025d9a3856a873f3a2cf Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 23 Oct 2019 03:28:35 -0400 Subject: expand configuration docs a bit --- README.md | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 51b9436..2ba92fc 100644 --- a/README.md +++ b/README.md @@ -82,14 +82,30 @@ You can play back previously recorded ttyrec files by using `tt play`. ## Configuration -Besides command line flags (which have documentation available via `tt help`), +### Command line flags + +These are documented via `tt help`. + +### Environment variables + +`tt` respects the `RUST_LOG` environment variable to adjust the logging +verbosity. By default, `tt server` displays logs at the `info` level and the +rest of the commands display logs at the `error` level, but you can run a +command like `RUST_LOG=tt=info tt stream` to see more information. Note that +for interactive commands like `tt stream`, this will likely be disruptive, but +you can send the output to a file by redirecting `STDERR` (since all process +output is written to `tt`'s `STDOUT` and all log output is written to `tt`'s +`STDERR`), like this: `RUST_LOG=tt=info tt stream 2>>stream.log`. + +### Configuration file + `teleterm` also optionally reads configuration from a configuration file. This file should be in [TOML](https://en.wikipedia.org/wiki/TOML) format, and stored either in `~/.config/teleterm/config.toml` or `/etc/teleterm/config.toml`. If a configuration file does not exist, `tt stream` and `tt watch` will offer to create one for you automatically. The configuration has several sections: -### `[server]` (used by `tt server`) +#### `[server]` (used by `tt server`) * `listen_address` * Local address for the server to listen on, in the format `HOST:PORT`. @@ -136,7 +152,7 @@ create one for you automatically. The configuration has several sections: * Same as `uid`, except sets the user's primary group. * Default: unset -### `[oauth.]` (used by `tt server`) +#### `[oauth.]` (used by `tt server`) `` corresponds to an OAuth-using login method - for instance, a section would be named something like `[oauth.recurse_center]`. Note that OAuth login @@ -147,7 +163,7 @@ methods are required to use `http://localhost:44141` as their redirect URL. * `client_secret` * OAuth client secret. -### `[client]` (used by `tt stream` and `tt watch`) +#### `[client]` (used by `tt stream` and `tt watch`) * `auth` * Login method to use (must be one of the methods that the server has been @@ -166,7 +182,7 @@ methods are required to use `http://localhost:44141` as their redirect URL. * Whether to connect to the server using TLS. * Default: `false` -### `[command]` (used by `tt stream` and `tt record`) +#### `[command]` (used by `tt stream` and `tt record`) * `buffer_size` * Maximum size of the buffer to maintain, which will be sent to the server @@ -181,7 +197,7 @@ methods are required to use `http://localhost:44141` as their redirect URL. * List of arguments to pass to `command`. * Default: `[]` -### `[ttyrec]` (used by `tt record` and `tt play`) +#### `[ttyrec]` (used by `tt record` and `tt play`) * `filename` * Name of the TTYrec file to save to or read from. -- cgit v1.2.3-54-g00ecf