当前位置:网站首页>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 .
边栏推荐
- Write a jison parser from scratch (6/10): parse, not define syntax
- Development trend and market demand analysis report of high purity tin chloride in the world and China Ⓔ 2022 ~ 2027
- The 14th five year plan and investment risk analysis report of China's hydrogen fluoride industry 2022 ~ 2028
- Simulate EF dbcontext with MOQ - mocking EF dbcontext with MOQ
- 2022-2028 global gasket metal plate heat exchanger industry research and trend analysis report
- C language - Introduction - Foundation - syntax - [identifier, keyword, semicolon, space, comment, input and output] (III)
- Les différents modèles imbriqués de listview et Pageview avec les conseils de flutter
- 20220701 barbarat lemma proof
- C語言-入門-基礎-語法-[運算符,類型轉換](六)
- 2022-2028 global special starch industry research and trend analysis report
猜你喜欢

2022-2028 global gasket metal plate heat exchanger industry research and trend analysis report

Nurse level JDEC addition, deletion, modification and inspection exercise

HMS core helps baby bus show high-quality children's digital content to global developers

Explain TCP protocol in detail three handshakes and four waves

pcl::fromROSMsg报警告Failed to find match for field ‘intensity‘.
![[C Advanced] file operation (2)](/img/50/e3f09d7025c14ee6c633732aa73cbf.jpg)
[C Advanced] file operation (2)

Mac platform forgets the root password of MySQL

法向量点云旋转

2022-2028 global optical transparency industry research and trend analysis report

Daughter love in lunch box
随机推荐
In depth investigation and Strategic Research Report on China's motion controller Market (2022 Edition)
《网络是怎么样连接的》读书笔记 - Tcp/IP连接(二)
2022-2028 research and trend analysis report on the global edible essence industry
Report on investment analysis and prospect trend prediction of China's MOCVD industry Ⓤ 2022 ~ 2028
`Example of mask ` tool use
Dede plug-in (multi-function integration)
Summary of the most comprehensive CTF web question ideas (updating)
Analysis report on the development status and investment planning of China's modular power supply industry Ⓠ 2022 ~ 2028
Multilingual Wikipedia website source code development part II
UML 时序图[通俗易懂]
Review of last week's hot spots (6.27-7.3)
[on February 11, 2022, the latest and most fully available script library collection of the whole network, a total of 23]
2022-2028 global tensile strain sensor industry research and trend analysis report
China electronic grade sulfur trioxide Market Forecast and investment strategy report (2022 Edition)
The old-fashioned synchronized lock optimization will make it clear to you at once!
Global and Chinese markets of hemoglobin analyzers in care points 2022-2028: Research Report on technology, participants, trends, market size and share
Les différents modèles imbriqués de listview et Pageview avec les conseils de flutter
MySQL foundation 02 - installing MySQL in non docker version
C language - Introduction - Foundation - syntax - [main function, header file] (II)
Basic data types in golang