Is passive logging possible in .NET?

前端 未结 6 435
北海茫月
北海茫月 2021-02-02 03:19

I\'m frequently frustrated by the amount of logging I have to include in my code and it leads me to wonder if there\'s a better way of doing things.

I don\'t know if thi

6条回答
  •  抹茶落季
    2021-02-02 03:42

    You can use PostSharp to log "around" the method. This is exactly the kind of thing AOP is good at. You might want to start with Log4PostSharp - a plugin specifically for logging.

提交回复
热议问题