当前位置:网站首页>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 .
边栏推荐
- Luogu deep foundation part 1 Introduction to language Chapter 4 loop structure programming (2022.02.14)
- Latex download installation record
- About the for range traversal operation in channel in golang
- DR6018-CP01-wifi6-Qualcomm-IPQ6010-IPQ6018-FAMILY-2T2R-2.5G-ETH-port-CP01-802-11AX-MU-MIMO-OFDMA
- After unplugging the network cable, does the original TCP connection still exist?
- Some points needing attention in PMP learning
- 2022-2028 global industrial gasket plate heat exchanger industry research and trend analysis report
- C language - Introduction - Foundation - syntax - [operators, type conversion] (6)
- el-table单选并隐藏全选框
- Tkinter Huarong Road 4x4 tutorial II
猜你喜欢

Solve the problem of "Chinese garbled MySQL fields"

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

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

2022-2028 global special starch industry research and trend analysis report

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)

How do microservices aggregate API documents? This wave of show~

Sword finger offer 30 contains the stack of Min function

Mantis creates users without password options
![C language - Introduction - Foundation - syntax - [variable, constant light, scope] (V)](/img/dc/5c8077c10cdc7ad6e6f92dedfbe797.png)
C language - Introduction - Foundation - syntax - [variable, constant light, scope] (V)
随机推荐
LinkedList in the list set is stored in order
Trim leading or trailing characters from strings- Trim leading or trailing characters from a string?
如何编写单元测试用例
How does idea withdraw code from remote push
Research Report on the development trend and Prospect of global and Chinese zinc antimonide market Ⓚ 2022 ~ 2027
Analysis report on the production and marketing demand and investment forecast of tellurium dioxide in the world and China Ⓣ 2022 ~ 2027
Write a jison parser from scratch (5/10): a brief introduction to the working principle of jison parser syntax
C语言-入门-基础-语法-数据类型(四)
C語言-入門-基礎-語法-[運算符,類型轉換](六)
Launpad | 基礎知識
2022-2028 global tensile strain sensor industry research and trend analysis report
Investment analysis and future production and marketing demand forecast report of China's paper industry Ⓥ 2022 ~ 2028
Write a jison parser from scratch (6/10): parse, not define syntax
HMS core helps baby bus show high-quality children's digital content to global developers
[untitled] forwarding least square method
《网络是怎么样连接的》读书笔记 - 集线器、路由器和路由器(三)
Summary of the most comprehensive CTF web question ideas (updating)
Four common methods of copying object attributes (summarize the highest efficiency)
ArrayBuffer
Luogu deep foundation part 1 Introduction to language Chapter 4 loop structure programming (2022.02.14)