
Ok, I've had time to take a look now. My plan was that the logback-classic Logger would simply extend org.slf4j.n.helper.AbstractLoggerBase. That way, only the following 3 methods would need implementation: Threshold getThreshold() boolean isEnabled(Level level, Marker marker) void log(Level level, Marker marker, Message message, Throwable throwable) The log-method above would just call filterAndLog(String localFQCN, Marker marker, Level level, Message msg, Throwable t). The implementation of old and new SLF4J-API implementations must be separated so it's possible to either call org.slf4j.n.LoggerFactory (for org.slf4j.n.Logger) or org.slf4j.LoggerFactory (for org.slf4j.Logger) while deserializing a Logger, i.e. the Logback Logger implementation should *not* implement org.slf4j.Logger anymore. Instead, org.slf4j.impl.StaticLoggerBinder should return org.slf4j.n.helpers.UsingNewLoggerFactory which is implemented like this: Logger getLogger(String name) { return org.slf4j.n.LoggerFactory.getLogger(name).getOldLogger(); } Does this help as an explanation so far? Regards, Joern. On 18.01.2010, at 18:27, Ralph Goers wrote:
On Jan 6, 2010, at 5:41 PM, Ralph Goers wrote:
On Dec 24, 2009, at 3:59 PM, Ralph Goers wrote:
On Dec 13, 2009, at 4:45 PM, Ralph Goers wrote:
On Dec 13, 2009, at 2:14 PM, Ceki Gülcü wrote:
Ralph Goers wrote:
The only issue I found was with LoggingEventSerializationPerfTest. It failed because averageSize exceeds averageSizeLimit. I've looked at that code but for the life of me I can't understand what it is attempting to validate. The size seems to be calculated by incrementing a counter everyting NoopOutputStream's write method is called. My guess is that this is an attempt to determine the length of the serialized data. The trouble is, when I changed the output stream to a FileOutputStream and serialized the object to it then size of the file was not even close to the value returned by NoopOutputStream's size method. Is that what is being attempted here? What is the real value in limiting the size? When I looked at the test the limit on the first test is 60 while the actual is 58. With the Message object replacing the message string and parameters the value is now 68.
LoggingEventSerializationPerfTest serves as a regression test. The idea was to catch unsolicited increases (regressions) in the size of the serialized messages. There is nothing sacred about the number 60.
Ok. If you'd care to take a look it is available at git:// github.com/rgoers/slf4j.git and git://github.com/rgoers/ logback.git.
Ralph
Merry Christmas!
I've made some minor changes to this. I'd appreciate a review of this and comments if you can find the time.
Ralph
I hope you had a happy new year. I'm still hoping you can find time to review this.
Ralph
Once again, I would appreciate feedback on this. I would especially value your input Joern since the move to using a Message was your idea.
Ralph
_______________________________________________ logback-dev mailing list logback-dev@qos.ch http://qos.ch/mailman/listinfo/logback-dev