[PATCH 1/3] lib: rework logging and framework to allow for multiple output logs
Alex Hung
alex.hung at canonical.com
Mon Jun 18 03:12:30 UTC 2012
On 06/11/2012 06:00 PM, Colin King wrote:
> From: Colin Ian King<colin.king at canonical.com>
>
> Since we now can output many different log types we should also
> allow for multiple log types to be written during a run. This involves
> some considerable re-working of the logging engine.
>
> 1. The fw->log_type is now a bit map of log_types
> 2. We add a list of log types to be written to fwts_log, this is a list
> of fwts_log_file types.
> 3. We need to re-work the log name handling so that we can open multiple
> log files with different suffixes depending on the log type.
> 4. To reduce the amount of vsnprintf() of the formatted log output we
> now handle this in the log fwts_log_printf() and pass down the formatted
> output to the different logging handlers rather than keep on re-formatting
> at the lowest logging handler layer.
>
> There are a lot of changing is this patch. I tried to break it down, but
> since there are so many interdependant changes I had to resort to one big
> patch
>
> Signed-off-by: Colin Ian King<colin.king at canonical.com>
> ---
> src/lib/include/fwts_log.h | 66 +++++--
> src/lib/src/fwts_framework.c | 94 +++++-----
> src/lib/src/fwts_log.c | 363 +++++++++++++++++++++++++++++---------
> src/lib/src/fwts_log_html.c | 133 +++++++-------
> src/lib/src/fwts_log_json.c | 52 +++---
> src/lib/src/fwts_log_plaintext.c | 63 ++++---
> src/lib/src/fwts_log_xml.c | 72 ++++----
> 7 files changed, 527 insertions(+), 316 deletions(-)
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list