Hi all

The RequestProgressTrackerLogFilter allows logging the information
collected by the RequestProgressTracker at debug level. Since this can
amount to several undred lines logged per request, this may be
prohibiitive on a busy production system.

I propose to reduce the size of the log file by doing the following:
1. changing the log format to include less redundant data
2. allow filtering by request duration
3. allow filtering by request extension(s)

Regarding point 1, currently each "message" of the RPT is logged with
a debug statement. The proposed "compact" format only logs one debug
statement. This spans multiple lines, space indented, similar to how
stack-traces are logged. See an example of both at the bottom of this
message.

I created SLING-4114 [0] with a patch attached that implements these
changes. Note that I made some additions to the RequestProgressTracker
API. These should be compatible for consumers, so I think they should
not do any harm.

Could someone please take a look at the patch, and if everything is
ok, commit it? Thank you.

Regards
Julian

[0] https://issues.apache.org/jira/browse/SLING-4114

Old format:
28.10.2014 10:49:20.635 *DEBUG* [127.0.0.1 [1414489760633] PUT
/libs/sling/topology/connector.json HTTP/1.1]
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
REQUEST_1 -       0 (2014-10-28 10:49:20) TIMER_START{Request
Processing}
28.10.2014 10:49:20.636 *DEBUG* [127.0.0.1 [1414489760633] PUT
/libs/sling/topology/connector.json HTTP/1.1]
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
REQUEST_1 -       0 (2014-10-28 10:49:20) COMMENT timer_end format is
{<elapsed msec>,<timer name>} <optional message>
28.10.2014 10:49:20.637 *DEBUG* [127.0.0.1 [1414489760633] PUT
/libs/sling/topology/connector.json HTTP/1.1]
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
REQUEST_1 -       0 (2014-10-28 10:49:20) LOG Method=PUT,
PathInfo=/libs/sling/topology/connector.json

Compact format:
28.10.2014 10:49:20.635 *DEBUG* [127.0.0.1 [1414489760633] PUT
/libs/sling/topology/connector.json HTTP/1.1]
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
       0 (2014-10-28 10:49:20) TIMER_START{Request Processing}
       0 (2014-10-28 10:49:20) COMMENT timer_end format is {<elapsed
msec>,<timer name>} <optional message>
       0 (2014-10-28 10:49:20) LOG Method=PUT,
PathInfo=/libs/sling/topology/connector.json

Reply via email to