On 12/11/2007, at 4:53 PM, Joakim Erdfelt wrote:
OK, what I got from this is some proxy logging guidelines.
1) Always include the source repository id
2) Always include the resource being requested
3) Use DEBUG severity level for normal (happy path) events.
4) Use INFO severity level for whitelist / blacklist rejections.
5) Use INFO severity level for transfer rejections due to policy
failures.
6) Use WARN severity level for connection / transfer errors from
java.io.* or wagon.
and a few other things in there I was more specific about, like
minimising the number of lines logged (for easier viewing and less
confusion due to interleaving as load goes up)
Some questions that are left.
* Do we consider the target repository id to be important to always
log?
yes, even more so than the managed (source) repo
* Do we show the resource (the path) or the artifact (the
group:artifact:version:classifier:type key) in the log?
don't care as long as it's consistent. Will there be instances before
calculating the artifact that it needs to be logged? What about
metadata?
* Do we show in the log a "whats left" list of repositories that
can/will be checked next? (and indications if no more proxies are
being
checked?)
No, just one time log them all. I don't think it should be necessary
if the log line aggregates that information which I think is what I
was suggesting.
* Do we log the network proxy setting? that it is being used?
If so, then at what severity level?
I don't think I want to see it all the time - maybe just when a conn
fails.
Note: I'm considering creating a ProxyEvents object (or just
methods in
DefaultProxyConnector) to maintain a consistent logging experience.
.logEvent(String sourceRepoId, String targetRepoId, String resource,
String msg)
.logRejection(String sourceRepoId, String targetRepoId, String
resource,
String rejectionType, String reason)
.logError(String sourceRepoId, String targetRepoId, String resource,
String where, String reason, boolean continuing)
Idea here it to abstract the logging, and force/remind the
developer to
include certain information, and make the formatting consistent (to
have
a consistent user experience)
Seems to make sense, though could equally be done with methods in the
proxy connector implementation too.
- Brett
--
Brett Porter - [EMAIL PROTECTED]
Blog: http://www.devzuz.org/blogs/bporter/