Traditional logging vs AOP logging

前端 未结 4 1307
离开以前
离开以前 2020-12-01 14:40

I\'m starting this new project and we are thrashing out our logging/debugging approach and I wanted to put the question to the rest of you on SO, given

priva         


        
4条回答
  •  有刺的猬
    2020-12-01 15:16

    I'm quite found of the aspect oriented approach. It feels right to separate logging from logic. I'm not sure of the performance overhead though.

    Even if you decide not to go with AOP there are better ways of doing logging than this:

    if(logger.isDebugEnabled())

    Have a look at log4j which will enable you to change log levels, different appenders and a whole lot of other things.

提交回复
热议问题