Implementar o reemplazar el registro de bienes comunes

I use Spring which somehow relies on org.apache.commons.logging. I have got my own logger that already implements SLF4J and some proprietary protocol. So I'm really keen to use my logger.

In SLF4J you implement org.slf4j.impl.StaticLoggerBinder and use some factory and logger interface.

Is it the same in commons logging? Implement org.apache.commons.logging.LogFactory and use a few interfaces? Is there some reference implementation of LogFactory? Or am I thinking completely wrong here? All these different logging "standards" are driving me crazy.

Muchas Gracias

preguntado el 27 de agosto de 11 a las 22:08

what is the problem you are facing? that is why commons logging an issue, just curious -

because it doesn't use my logger, so I have to different loggers running, and that is ugly :-) -

1 Respuestas

It should be quite easy to shut off commonslogging in Spring and integrate it with slf4j instead. At that point you can simply pass your own logger to Spring and use it through slf4j functions. You can find the information you need at paragraph 1.3.2 aquí.

Also, I'm not a fan of reinventing the wheel and I would strongly suggest you to look at existing or brand new logging frameworks like Volver a iniciar sesión por ejemplo.

Respondido 28 ago 11, 02:08

Perfect, the jcl-over-slf4j bridge does the trick. I don't want any logger out there, because they are all total overweight and are not optimized for concurrency. I only need my stuff in one file. For that I don't need monster loggers. - Franz Kafka

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.