Add --log-append option

Add --log-append option which makes tio append to any existing log file.

This also changes the default behaviour of tio from appending to
overwriting any existing log file. Now you have to use this new option
to make tio append.
This commit is contained in:
Martin Lund 2023-04-28 20:50:31 +02:00
parent 3bedd85e7c
commit 148a3c1da1
7 changed files with 28 additions and 2 deletions

View file

@ -74,6 +74,7 @@ struct option_t option =
.ri_pulse_duration = 100,
.no_autoconnect = false,
.log = false,
.log_append = false,
.log_filename = NULL,
.log_strip = false,
.local_echo = false,
@ -119,6 +120,7 @@ void print_help(char *argv[])
printf(" -L, --list-devices List available serial devices by ID\n");
printf(" -l, --log Enable log to file\n");
printf(" --log-file <filename> Set log filename\n");
printf(" --log-append Append to log file\n");
printf(" --log-strip Strip control characters and escape sequences\n");
printf(" -m, --map <flags> Map characters\n");
printf(" -c, --color 0..255|bold|none|list Colorize tio text (default: bold)\n");