Is log4net packaging to reduce traction?

Is log4net packaging to reduce traction? Or introduce an instance of the registrar in a public property antipattern? How do you approach the log4net dependency?

+3
source share
3 answers

Wrap the logger for the following reasons -

  • It isolates the changes only from the registrar, in the future, if you want to change it to something better, not cascading changes.
  • It makes your life easier when you want to write test cases. You can easily make fun of the material you need.
  • , . factory/. Ex - /, . factory/registry driven.

, , .

+1

a - .NET. , . " " . , .

log4net - , , , , " "... .

, , , .

0

log4net, unitTest .

loggingInterface.

unit test , 'bool ErrorWasLogged()', , . , , , .

0

Source: https://habr.com/ru/post/1726517/


All Articles