Hi,
I just had a quick look at the 2.0.0 api, and there are some features
that seem to be missing which would be really nice to have. For one of
them I already created a JIRA entry a time ago, another one I came
across because I use SLF4J a lot now.
1) It would be nice to have a generic log method in the Log interface,
which allows you to log with an arbitrary log level (LOGGING-110).
2) It would be nice to have formatting of log messages as SLF4J has with
the MessageFormat api. In combination with varargs (java5); this makes
for a really flexible logging mechanism which makes the code much more
concise and avoids testing for log level and formatting of messages
yourself while still remaining efficient, e.g., something like this:
log.debug("The disk \"{1}\" contains {0} file(s).", count, disk);
A possible method signature problem could occur here (if there is a var
args version of the method) because it would conflict with the version
that also has the throwable as an argument. A solution would be to have
the throwable first, i.e., log.debug(throwable, messageFormat,
arguments...). If JCL 2.0.0 needs to be designed to be java 1.4
compatible, having versions with the Object[]'s instead of varargs would
still be immensely useful though.
Just some thoughts,
Sebastiaan van Erk.
Boris Unckel wrote:
Hello,
I have seen the recent discussions on JCL 2.0.0 and a version without
autodiscovery.
Someone stated to stop any further development (with good reasons
behind) but I am
thinking different.
Please have a look at the (working) code:
https://issues.apache.org/jira/browse/LOGGING-112
It has a static binding, some improvements in the logfactories
(recognizes native implementations).
API and implementations are cleanly separated, the 1.1.x diagnostic
function is still used.
What are your thoughts?
Is this a possible direction?
Is it worth to put more time and energy into this?
Regards
Boris
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]