当前位置:网站首页>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 .
边栏推荐
- Lauchpad X | 模式
- Global and Chinese PCB function test scale analysis and development prospect planning report Ⓑ 2022 ~ 2027
- The child container margin top acts on the parent container
- "How to connect the Internet" reading notes - FTTH
- PHP student achievement management system, the database uses mysql, including source code and database SQL files, with the login management function of students and teachers
- [on February 11, 2022, the latest and most fully available script library collection of the whole network, a total of 23]
- C language - Introduction - Foundation - syntax - data type (4)
- Global and Chinese trisodium bicarbonate operation mode and future development forecast report Ⓢ 2022 ~ 2027
- Service call feign of "micro service"
- 2022-2028 global strain gauge pressure sensor industry research and trend analysis report
猜你喜欢
Latex download installation record
Opencv environment construction (I)
2022-2028 global gasket plate heat exchanger industry research and trend analysis report
How do microservices aggregate API documents? This wave of show~
If you can quickly generate a dictionary from two lists
2022-2028 global special starch industry research and trend analysis report
Svg image quoted from CodeChina
2022-2028 global seeder industry research and trend analysis report
The child container margin top acts on the parent container
2022-2028 global small batch batch batch furnace industry research and trend analysis report
随机推荐
165 webmaster online toolbox website source code / hare online tool system v2.2.7 Chinese version
Multilingual Wikipedia website source code development part II
Trim leading or trailing characters from strings- Trim leading or trailing characters from a string?
Get the source code in the mask with the help of shims
"How to connect the Internet" reading notes - FTTH
2022-2028 global small batch batch batch furnace industry research and trend analysis report
26. Delete duplicates in the ordered array (fast and slow pointer de duplication)
UML 时序图[通俗易懂]
如何编写单元测试用例
How should PMP learning ideas be realized?
20220701 Barbalat引理证明
C language - Introduction - Foundation - syntax - [identifier, keyword, semicolon, space, comment, input and output] (III)
Explain TCP protocol in detail three handshakes and four waves
C language - Introduction - Foundation - syntax - [operators, type conversion] (6)
Development trend and market demand analysis report of high purity tin chloride in the world and China Ⓔ 2022 ~ 2027
Flutter tips: various fancy nesting of listview and pageview
Write a jison parser (7/10) from scratch: the iterative development process of the parser generator 'parser generator'
The child container margin top acts on the parent container
In depth investigation and Strategic Research Report on China's motion controller Market (2022 Edition)
Launpad | basic knowledge