Log4Net in WCF not working

前端 未结 5 1059
情深已故
情深已故 2020-12-03 22:40

Hi I am trying to use Log4Net in WCF IIS hosted service, but it doesn\'t log any data. Has anyone achieved logging in WCF service using Log4Net?

5条回答
  •  遥遥无期
    2020-12-03 23:28

    Using the assembly attribute to configure log4net will not work since log4net will not check the right directory for the config file. Maybe you could try to use some relative path when specifying the config file but it is easier to use one of the suggested solutions here.

提交回复
热议问题