当前位置:网站首页>Log cannot be recorded after log4net is deployed to the server
Log cannot be recorded after log4net is deployed to the server
2022-07-04 09:33:00 【Dandelion_ drq】
It can be recorded in the development environment , But not after the release . I have been troubled by this problem for a long time , Today, I finally found the reason !!
my log4net The configuration file is written separately , It is saved in the root directory of the project .
The way to specify the configuration file is through AssemblyInfo.cs add to [assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)] This code specifies .

Above is my project structure . I encapsulated one in the project LogHelper, call log4net Methods of are written in this class , This class is in the Common Under the project , Then other projects cite Common Under the LogHelper, So I only changed the quoted Common Project AssemblyInfo.cs file , And the correct way is to modify the main project AssemblyInfo.cs file !!
ok …… After the change, it was OK ……OTL
PS: If you use the method of recording to file , You may need to give IIS_IUSRS User configured folder read and write permissions .
边栏推荐
- Service call feign of "micro service"
- About the for range traversal operation in channel in golang
- Global and Chinese markets of thrombography hemostasis analyzer (TEG) 2022-2028: Research Report on technology, participants, trends, market size and share
- 2022-2028 research and trend analysis report on the global edible essence industry
- What is uid? What is auth? What is a verifier?
- HMS core helps baby bus show high-quality children's digital content to global developers
- Get the source code in the mask with the help of shims
- 26. Delete duplicates in the ordered array (fast and slow pointer de duplication)
- Trim leading or trailing characters from strings- Trim leading or trailing characters from a string?
- Latex download installation record
猜你喜欢
![Reload CUDA and cudnn (for tensorflow and pytorch) [personal sorting summary]](/img/3f/a71b56a62d2a0d64749a6af05384f5.jpg)
Reload CUDA and cudnn (for tensorflow and pytorch) [personal sorting summary]

Daughter love in lunch box

The child container margin top acts on the parent container

Svg image quoted from CodeChina

Mantis creates users without password options

2022-2028 global probiotics industry research and trend analysis report

2022-2028 global industry research and trend analysis report on anterior segment and fundus OTC detectors

How should PMP learning ideas be realized?

Logstack configuration details -- elasticstack (elk) work notes 020

AMLOGIC gsensor debugging
随机推荐
C language - Introduction - Foundation - syntax - [main function, header file] (II)
2022-2028 global tensile strain sensor industry research and trend analysis report
Pueue data migration from '0.4.0' to '0.5.0' versions
Write a jison parser from scratch (2/10): learn the correct posture of the parser generator parser generator
Global and Chinese markets of thrombography hemostasis analyzer (TEG) 2022-2028: Research Report on technology, participants, trends, market size and share
How does idea withdraw code from remote push
After unplugging the network cable, does the original TCP connection still exist?
Solution to null JSON after serialization in golang
Dede plug-in (multi-function integration)
165 webmaster online toolbox website source code / hare online tool system v2.2.7 Chinese version
《网络是怎么样连接的》读书笔记 - FTTH
Les différents modèles imbriqués de listview et Pageview avec les conseils de flutter
Launpad | Basics
2022-2028 global elastic strain sensor industry research and trend analysis report
PHP book borrowing management system, with complete functions, supports user foreground management and background management, and supports the latest version of PHP 7 x. Database mysql
Launpad | 基础知识
PMP registration process and precautions
C language - Introduction - Foundation - syntax - data type (4)
HMS core helps baby bus show high-quality children's digital content to global developers
2022-2028 global optical transparency industry research and trend analysis report