Andreas Hartmann wrote:
Michael Wechner wrote:
[...]
the problem I see is that the DefaultDocument is an implementation
and if the implementation
itself does not throw a WARNING or an ERROR, but only higher up,
then it's very hard to debug
where the actually problem is located.
I don't understand this implication. You throw an exception when a
problem occurs. Why should you log a warning if the caller might
interpret the result of this method as a problem? Then you could
log warnings in virtually every line of the code.
I am not talking about logging warnings for every line, but for
particular cases.
You're suggesting to log warning in existsInAnyLanguage().
Some cases where this method could be used:
- preconditions of "create new document" (check if document already
exists)
- moving documents (check if target document already exists)
- searching for documents by document ID
- checking for dead links
- ...
In none of these cases, a "potentially harmful situation" occurs.
what do you mean by "harmful"? The system might not crash just because a
document does not exist,
but it's nevertheless important to know why it doesn't exist, because
the system is worthless if doesn't
do what it is intended for. A car which makes a sound is great, but if
it doesn't drive what good is it.
This is why I think WARNINGS are appropriate.
Lenya currently sends you a message in the sense "no such document"
which really sucks,
because it gives you no clue why there is no such document.
How is this related to logging?
I agree that the error handling could be improved, but I don't
see the connection between warning logs and meaningless error screens ...
at least I might find something useful within the logfiles. At the
moment I cannot find
anything really useful within the logfile or it's very hard to figure
hard what might be the
actual problem (see also Josias notes re "avalon keys")
Is it a problem of the particular SiteManager? is it a problem of the
particular Repository?
Is it a problem of the SourceImplementation?
In the case of more complex resource types this can become even more
annoying ...
I have spent a lot of time over the last couple of days to figure out
current bugs and
just because the logging sucks. Just wait until you will spend time
on this ;-)
I guess I misunderstand this sentence - it seems to imply that
I have not spent any time fixing bugs in 1.4-dev ...
no, not all. But it seems that it's very simple for you to debug stuff.
So either I don't know something which you know, or I am just stupid.
Why not log stuff which really helps in the case of a problem. Why make
people's life
difficult?
Also consider that in productive environments it will be even more a
problem.
Or do you really want to end up with something like:
"Unexpected System Failure" (go ask your admin)
?
Why do you ask me that? Did I somehow suggest that?
no, but currently that's how Lenya works and I want to fix this.
And I appreciate any help on this.
Michi
-- Andreas
--
Michael Wechner
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
[EMAIL PROTECTED] [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]