Settings¶
Launch Options¶
better_launch has a few settings that can be set from launchfiles or externally.
Every option listed here can be set in the launchfile, as an environment variable, or passed as a command line argument. The priority order is always CLI > env > launchfile. Their names slightly change depending on where you define them:
- In python launchfiles, pass them in lowercase to the @launch_this decorator (e.g.
ui=True). - For TOML lanuchfiles, define them as global launch arguments and add a
bl_prefix (souibecomesbl_ui). - As environment variables they become uppercase and get a
BL_prefix (souibecomesBL_UI). - On the command line they get a
--bl-prefix and underscores become dashes (souibecomes--bl-ui).
ui (bool)
Enables or disables the terminal UI.
colormode (string)
How to apply colors to terminal logging output.
- default: uniform highlight for node names, colored severity levels.
- severity: colored severity levels.
- source: colored node names.
- none: no colors.
- rainbow: colored node names, colored severity levels.
print_limit (int)
Limits the character length of messages printed to the terminal. No limit if <= 0.
screen_log_level (int)
Only print messages to the terminal if they have at least this severity (based on python's logging module). , as defined in python's logging module (10 = DEBUG, 20 = INFO, etc).
file_log_level (int)
Only write messages to log files if they have at least this severity (see above).
screen_log_format (string)
Overrides the format for messages logged to the terminal. Check the PrettyLogFormatter for valid syntax.
file_log_format (string)
Overrides the format for messages logged to log files, following the same format as the screen log format.
TUI Shortcuts¶
On some systems the default TUI shortcuts may be inconvenient, e.g. due to conflicts with system or terminal shortcuts. These can be changed by placing a special string in the BL_TUI_KEYBINDS environment variable. For example, to change the Nodes action to ctrl-n and the Log Level action to ctrl-l you would specify
export BL_TUI_KEYBINDS="nodes: c-n; loglevel: c-l"
The syntax is always <action>:<keys> separated by ;. Valid actions are exit, mute, nodes, loglevel, cancel, enter, next, previous. For valid key specifiers see the prompt_toolkit documentation.
Warning
Take special note of how the quirks around ctrl-s, ctrl-q, and the Alt/Meta/Option keys. The former can not be bound in most terminals without additional setup, while combinations with the meta key are treated as two separate key presses. This too is documented on the prompt_toolkit website.