Also changes default timestamp format from ISO8601 to classic 24-hour
format as this is assumed to be the format that most users would prefer.
And reintroduces strict but optional ISO8601 format.
This feature allows to easily add more timestamp formats in the future.
Allow user to select which ANSI color code to use to colorize the tio
text. To successfully set the color the color code must be in the range
0..255.
If color code is negative tio will print all available ANSI colors.
The default color is changed to bold white to make tio defaults usable
for most users, including color blind users.
But make the timestamp format RFC3339 compliant instead. The RFC states:
NOTE: ISO 8601 defines date and time separated by "T".
Applications using this syntax may choose, for the sake of
readability, to specify a full-date and full-time separated by
(say) a space character.
This way we keep the information specified by ISO 8601 but make it more
human readable which is better for the console output.
We do not need the date part of the timestamp. It simply takes up too
much precious line space. In case of logging to file, one can easily
conclude the date from the file date information.
* Show milliseconds too in the timestamp (#114) and log file (#124)
* Change timestamp format to ISO-8601.
Co-authored-by: Attila Veghelyi <aveghelyi@dension.com>
Co-authored-by: Sylvain LAFRASSE <sly74fr@users.noreply.github.com>
This is to fix the issue #104. The timestamp will always be
printed at the beginning of line:
[10:25:56] Switched to hexadecimal mode
0d 0a 0d [10:25:57] 41 43 52 4e 3a 5c 3e 0d 0a 0d [10:25:58] 41
is changed to:
[12:34:56] 45 72 72 6f 72 3a 20 49 6e 76 61 6c 69 64 20
[12:34:56] 41 43 52 4e 3a 5c 3e
[12:34:56] 41 43 52 4e 3a 5c 3e
[12:34:57] 41 43 52 4e 3a 5c 3e 6c 73
Out of tree builds are currently broken because $(top_srcdir)src/include
is not in the search path. In tree builds are working because autconf add
$(top_builddir)/src/include to the search path for the generated config.h.
As $(top_builddir) and $(top_srcdir) are identical during in tree builds
the search path still end up beeing somehow correct.
To fix this add -I$(srcdir)/include to the CPPFLAGS in Makefile.am.
Include ioctls.h and termbits.h from asm-generic instead of asm to avoid
the following build failure:
In file included from setspeed2.c:24:0:
/home/naourr/work/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/asm/termbits.h:17:8: error: redefinition of 'struct termio'
struct termio {
^~~~~~
In file included from /home/naourr/work/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/sys/ioctl.h:29:0,
from setspeed2.c:22:
/home/naourr/work/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/bits/ioctl-types.h:36:8: note: originally defined here
struct termio
^~~~~~
Fixes:
- http://autobuild.buildroot.org/results/1a7418b9cd11374a250f7509d5bddcc864375e1c
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
In order for local echo to work properly, we have to either call
fflush(stdout) after every character or just disable line buffering.
This change calls fflush() after putchar().
Closes#92
In order for local echo to work properly, we have to either call
fflush(stdout) after every character or just disable line buffering.
This change uses setbuf(stdout, NULL) to do the latter.
Closes#92