Commit graph

16 commits

Author SHA1 Message Date
Martin Lund
256d6b4fc2 Merge branch 'allow_strip_esc_key' of https://github.com/nh26223/tio into nh26223-allow_strip_esc_key 2022-06-15 22:49:22 +02:00
Martin Lund
16cba00c54 Append to existing log file (no truncation) 2022-05-07 16:02:41 +02:00
Martin Lund
8965b7b42c Update headers 2022-03-11 15:15:39 +01:00
Martin Lund
9f2cac4e41 Fix log exit print 2022-02-19 10:00:21 +01:00
Martin Lund
45210bc741 Add support for automatically generated log filename
Automatically generate log filename if none is provided.

The auto generated file name is on the form:
"tio_DEVICE_YYYY-MM-DDTHH:MM:SS.log"
2022-02-19 09:29:33 +01:00
Martin Lund
137b2823af Update headers 2022-02-13 06:35:03 +01:00
Martin Lund
e9208d693e Replace autotools with meson
To introduce much simpler build configuration which is also easier to
maintain.
2022-02-10 05:09:32 +01:00
Yin Fengwei
c0c21b1814 Allow strip escape sequence characters from log file
The log without escape key stripped is like:

^M[12:47:17] ACRN:\>
^M[12:47:17] ACRN:\>lasdfjklsdjf
^M
^M[12:47:18] Error: Invalid command.
^M[12:47:19] ACRN:\>
^M[12:47:26] ACRN:\>
^M[12:47:26] ACRN:\>sdafkljsdkaljfklsadjflksdjafjsda^H ^H^H...
^M
^M[12:47:31] Error: Invalid command.

After strip escape key, the log is like:

[12:49:18] ACRN:\>
[12:49:19] ACRN:\>
[12:49:19] ACRN:\>ls

[12:49:19] Error: Invalid command.
[12:49:19] ACRN:\>
[12:49:19] ACRN:\>dfaslhj

[12:49:24] Error: Invalid command.

Beside escape key, it also handle backspace key as well.
2021-01-21 12:51:59 +08:00
Henner Zeller
763a09e172 Write to logfile as soon as we have the data, don't buffer.
Logfiles are important to see what happend, in particular if something
unexpected happened; so we want to make sure that the logfile is flushed
to disk.

Before this change, the logfile was typically written at the end in
a large chunk as the default (large) buffering applied. Now, characters are
written out ASAP, so it is possible to get a live-view with a
tail -f <logfile>
2018-06-23 11:42:23 -07:00
Martin Lund
f5e6c99721 Update copyright headers 2017-09-28 18:15:07 +02:00
Jakob Haufe
82063b73fb
Include config.h before standard headers
This makes use of 8d6d202 (Enable large file support) for real.
2016-05-21 21:15:33 +02:00
Martin Lund
79adb44d1b Fixed some error prints 2016-05-18 22:27:31 +02:00
Martin Lund
156f06c711 Updated tio title 2016-05-16 15:31:56 +02:00
Jakub Wilk
8fe74a7579 Added const to log_open() prototype 2016-05-08 12:40:47 +02:00
Martin Lund
9dd21af867 Renamed "gotty" to "tio"
Renamed to "tio" because it is shorter and this new name also more
precisely reflects what the program is - a simple TTY terminal I/O
application.

"tio" can be considered short for terminal I/O or TTY I/O or a
combination of the two, whichever you prefer.

Also, wanted to avoid naming conflicts with other projects.
2016-05-04 20:20:06 +02:00
Martin Lund
bbda0b8851 Added log feature
Added "--log <filename>" option which writes all activity to specified
file.
2016-05-01 21:21:05 +02:00