开发者

Morphia logging over log4j in spring

I want to log Morphia over Sfl4j with log4j. From Morphia's documentation:

Add this at the start of your application. It is do开发者_StackOverflow中文版ne once, statically. MorphiaLoggerFactory.registerLogger(SLF4JLoggerImplFactory.class);

I can't create necessary beans for above statement to get that work.


Despite the docs claiming otherwise, the class is actually called SLF4JLogrImplFactory (Logr, not Logger):

import com.google.code.morphia.logging.slf4j.*;

MorphiaLoggerFactory.registerLogger(SLF4JLogrImplFactory.class);


This seems like a spring issue. You need to find out how to do some kind of static initialization.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜