Hello, we have been making great use of the ops4j project including
pax.logging. This is a scala project and we have tried to take advantage of
the lazy parameter evaluation to avoid having to write the format strings
plus arrays. We are using code that looks almost exactly like this project:
https://github.com/weiglewilczek/slf4s

The issue we face is to get the lazy evaluation we have in effect created
another wrapper around slf4j and that throws off the "location" of the error
messages. When we get our Logger from the logger factory we check to see if
it implements the LocationAwareLogger interface and if so we can tell it the
correct classname and linenumber to user. This works if we directly use
log4j or java.util.logging, just not Pax because it doesn't implement the
interface (though it clearly does care about location)

Is is possible to implement this interface for Slf4jLogger?

http://www.slf4j.org/api/org/slf4j/spi/LocationAwareLogger.html

It looks like all that would be necessary is to add the log() function
to Slf4jLogger, PaxLogger interface and PaxLoggerImpl.

This would really help the scala community keep our code clear without
sacrificing functionality. I didn't see an obvious way to fork and rebuild
the package but if someone can point me in the right direction I could try
making these changes myself.

Thanks.

Sam Hendley
_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to