[PATCH 0/8] re-work fwts logging to generate json output
Colin King
colin.king at canonical.com
Wed May 16 13:20:17 UTC 2012
From: Colin Ian King <colin.king at canonical.com>
This patch set is a major re-working of the fwts logging back-end.
Changes include:
1. Removing the default line number and test name prefix on each
line of the fwts log output. This removes redundant information
and allows more relevant logging information per line. The old
style of logging can be re-instated using the option:
--log-format="%line %owner "
2. Move global log line number into the log struct
3. Fix an off-by-one bug in the underlining code.
4. Tidy up existing code.
5. Re-work the logging back-end, move existing logging into
a plaintext logging handler and add a new json logging hander.
For the structured logging (such as json) we add in some extra
section markers that allow us to structure the logging rather
than have a continuous stream of log lines.
Also add in the --log-type option to specify the plaintext
(default) or json output log formats.
6. Force non-word wrapping logging on the summary output, this
makes the final report summary tidier and more compact.
7. Update the man page to describe the new --log-type option.
Patches have been run past the fwts-test (see second patch set)
and also valgrind to check for any memory leaks on the json back
end.
Colin Ian King (8):
lib: fwts_log: remove default line num and test name from log
lib: move log line number into log struct
lib: fwts_log: re-work log underline
lib: fwts_log: tidy up white spaces and strncmps
lib: re-work logging to add in json formatted log output
lib: fwts_framework: default to plaintext log type
lib: fwts_summary.c: force non-word wrap using *_verbatum logging
doc: update man page
doc/fwts.1 | 6 +-
src/lib/include/fwts_framework.h | 3 +-
src/lib/include/fwts_log.h | 66 ++++++++---
src/lib/include/fwts_summary.h | 2 +-
src/lib/src/Makefile.am | 2 +
src/lib/src/fwts_framework.c | 97 +++++++++++++--
src/lib/src/fwts_log.c | 244 ++++++++++++++++----------------------
src/lib/src/fwts_log_json.c | 185 +++++++++++++++++++++++++++++
src/lib/src/fwts_log_plaintext.c | 195 ++++++++++++++++++++++++++++++
src/lib/src/fwts_summary.c | 20 ++--
src/lib/src/fwts_tag.c | 2 +-
11 files changed, 640 insertions(+), 182 deletions(-)
create mode 100644 src/lib/src/fwts_log_json.c
create mode 100644 src/lib/src/fwts_log_plaintext.c
--
1.7.10
More information about the fwts-devel
mailing list