当前位置:网站首页>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 .
边栏推荐
- There are 100 people eating 100 apples, one adult eating 4 apples, and four children eating 1 apple. How can they eat exactly 100 apples? Use any high-level language you are familiar with
- C语言-入门-基础-语法-[运算符,类型转换](六)
- Write a jison parser from scratch (4/10): detailed explanation of the syntax format of the jison parser generator
- Explanation of closures in golang
- Pueue data migration from '0.4.0' to '0.5.0' versions
- lolcat
- 【leetcode】29. Divide two numbers
- 2022-2028 research and trend analysis report on the global edible essence industry
- How to batch change file extensions in win10
- Research Report on the development trend and Prospect of global and Chinese zinc antimonide market Ⓚ 2022 ~ 2027
猜你喜欢

2022-2028 global tensile strain sensor industry research and trend analysis report
![C language - Introduction - Foundation - syntax - [identifier, keyword, semicolon, space, comment, input and output] (III)](/img/89/0f5f4ba07c637b09abe873016cba2d.png)
C language - Introduction - Foundation - syntax - [identifier, keyword, semicolon, space, comment, input and output] (III)
![[untitled] forwarding least square method](/img/8b/4039715e42cb4dc3e1006e8094184a.png)
[untitled] forwarding least square method

法向量点云旋转

Function comparison between cs5261 and ag9310 demoboard test board | cost advantage of cs5261 replacing ange ag9310

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
](/img/3f/4d8f4c77d9fde5dd3f53ef890ecfa8.png)
C语言-入门-基础-语法-[运算符,类型转换](六)

After unplugging the network cable, does the original TCP connection still exist?

保姆级JDEC增删改查练习

2022-2028 global seeder industry research and trend analysis report
随机推荐
2022-2028 global protein confectionery industry research and trend analysis report
SSM online examination system source code, database using mysql, online examination system, fully functional, randomly generated question bank, supporting a variety of question types, students, teache
Deadlock in channel
Research Report on the development trend and Prospect of global and Chinese zinc antimonide market Ⓚ 2022 ~ 2027
After unplugging the network cable, does the original TCP connection still exist?
`Example of mask ` tool use
什么是uid?什么是Auth?什么是验证器?
LeetCode 74. Search 2D matrix
[on February 11, 2022, the latest and most fully available script library collection of the whole network, a total of 23]
Write a jison parser from scratch (1/10):jison, not JSON
Leetcode (Sword finger offer) - 35 Replication of complex linked list
Investment analysis and prospect prediction report of global and Chinese high purity tin oxide Market Ⓞ 2022 ~ 2027
PHP personal album management system source code, realizes album classification and album grouping, as well as album image management. The database adopts Mysql to realize the login and registration f
Reading notes of how the network is connected - understanding the basic concepts of the network (I)
You can see the employment prospects of PMP project management
Get the source code in the mask with the help of shims
【LeetCode 42】501. Mode in binary search tree
Tkinter Huarong Road 4x4 tutorial II
Simulate EF dbcontext with MOQ - mocking EF dbcontext with MOQ
China electronic grade sulfur trioxide Market Forecast and investment strategy report (2022 Edition)