Item11026: "verbose mode" - framework for making FW detect and report bugs
Priority: Enhancement
Current State: Proposal Required
Released In: n/a
Target Release: n/a
Web software (eg, browsers, Foswiki) tends to be very accommodating,
making a valiant effort to make sense out of mangled markup, etc.
This is probably a Good Thing, in that it allows unskilled authors
to generate reasonably-formatted web pages.
However, in some cases, this is not the behavior
that an author or administrator might desire, eg:
- An author wants to know why the page isn't working as expected.
- An author wants to know if the page has any "submarine" problems.
- An administrator would like to scan a set of pages for problems.
Many logging systems define "log levels" which indicate the severity
of a message (eg, alert, debug, error, fatal, info, warning).
Similarly, many language processors have settings
which the programmer can adjust to control the topic(s) and level
of error reporting.
I would like to see a reporting framework of this sort in Foswiki.
Here are some general constraints/goals for its APIs:
- Both pages and plugins should be able to make reporting calls.
- Reporting calls should specify the problem type and/or level, along with enough supporting information to allow diagnosis.
- The type and/or level parameter(s) should be settable by either wiki variables or an option on the URL.
- The type and/or level parameter(s) should be readable by both pages and plugins.
- It should be possible to direct reports in various ways (eg, to the generated HTML for the page, to a wiki page).
Clearly, just having such a framework is no guarantee that anyone
will use it. However,
not having the framework guarantees that
almost nobody will detect and report problems.
--
RichMorin - 07 Aug 2011
FWIW we already have alert/debug/error/fatal etc. in Foswiki, see
Foswiki::Func::writeEvent. The logger API is pluggable and so can events can be written to a database or external logging tool, etc. rather than just
working/logs/foo.log
I understand the desire for this. Foswiki just quietly ignores things far too often, which is frustrating.
Sadly we've not really exploited the new logger API much, but for what it's worth, here are the mappings of the lib/Foswiki/Logger/PlainFile.pm= logger's log levels -> files:
34 # Map from a log level to the root of a log file name
35 our %LEVEL2LOG = (
36 debug => 'debug',
37 info => 'events',
38 warning => 'error',
39 error => 'error',
40 critical => 'error',
41 alert => 'error',
42 emergency => 'error'
43 );
--
PaulHarvey - 08 Aug 2011
The
Foswiki::Func::eachEventSince
provides an API for plugin authors to work with past events, but it would be nice to make them queryable somehow.
--
PaulHarvey - 08 Aug 2011
ah, yes, thanks for the reminder - I made a UI marco that added query search to part of this, but like so many things, there's more todo.
--
SvenDowideit - 14 Aug 2011