Issue Details (XML | Word | Printable)

Key: BETTERBEANSBINDING-9
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: fabriziogiudici
Reporter: Witold_Szczerba
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
BetterBeansBinding

introduce java.util.logging

Created: 20/Apr/09 11:55 AM   Updated: 11/Jun/09 10:03 PM   Resolved: 11/Jun/09 07:48 PM
Component/s: Core, SwingBinding
Affects Version/s: None
Fix Version/s: 1.3.0

Time Tracking:
Original Estimate: Not Specified
Remaining Estimate: 0 minutes
Remaining Estimate - 0 minutes
Time Spent: 30 minutes
Time Spent - 30 minutes

Tags: logger


 Description  « Hide

That would be really nice if we could just get rid of code like in this example:

--BeanProperty--
[...]
private static final boolean LOG = false;

private static void log(String method, String message) {
if (LOG) { System.err.println("LOG: " + method + ": " + message); }
}
---------

That would be great if logger could be used with appropriate levels like SEVERE when, for example, binding is incorrect - there is no feedback from the 'Beans Binding' now, and sometimes it is really hard to find out what is wrong.



fabriziogiudici added a comment - 20/Apr/09 03:42 PM

Accepted. And thanks for posting the first RFE for BBB.


Jay Kaluza added a comment - 22/Apr/09 02:24 PM

Would it be a better idea to use SLF4J instead? No one seems to be using the default java.util.logging anyway...it does not seem to get much love.


fabriziogiudici added a comment - 22/Apr/09 02:41 PM

I've been using util.logging for years, but I've planned to replace it. Indeed, among all the competition, SLF4J is the one I like more, also for a precise technical reason (you can avoid in most cases to wrap logging in to if (level == ) when you fear to waste time in composing the string; I mean, as util.logging only takes a single string as the message, without 'if' you spent the time to build the string out of its components).

My concern is about adding a dependency. Ok, I'm going to blog about that (please follow my blog on java.net) and collect some feedback before deciding.


fabriziogiudici added a comment - 26/Apr/09 11:58 AM

Don't do for the EL component, that we hope to drop sooner or later.


fabriziogiudici added a comment - 27/Apr/09 07:01 AM

fabriziogiudici added a comment - 11/Jun/09 07:33 PM

A specific wrapper class org.jdesktop.beansbinding.util.logging.Logger has been added. It wraps java.util.logging.Logger, in future could wrap other facilities.
For the rationale, see the discussion at http://netbeans.dzone.com/news/which-logging-facility-swing


fabriziogiudici added a comment - 11/Jun/09 10:03 PM