当前位置:网站首页>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 (4/10): detailed explanation of the syntax format of the jison parser generator
- How to display √ 2 on the command line terminal ̅? This is actually a blog's Unicode test article
- How should PMP learning ideas be realized?
- Fatal error in golang: concurrent map writes
- What is inner connection and outer connection? What are the uses and benefits
- Deadlock in channel
- AMLOGIC gsensor debugging
- Reload CUDA and cudnn (for tensorflow and pytorch) [personal sorting summary]
- Jianzhi offer 09 realizes queue with two stacks
- Are there any principal guaranteed financial products in 2022?
猜你喜欢

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

Sword finger offer 30 contains the stack of Min function

Explain TCP protocol in detail three handshakes and four waves

Latex download installation record

2022-2028 global seeder industry research and trend analysis report

Solve the problem of "Chinese garbled MySQL fields"
![C language - Introduction - Foundation - syntax - [main function, header file] (II)](/img/5a/c6a3c5cd8038d17c5b0ead2ad52764.png)
C language - Introduction - Foundation - syntax - [main function, header file] (II)
![C language - Introduction - Foundation - syntax - [operators, type conversion] (6)](/img/3f/4d8f4c77d9fde5dd3f53ef890ecfa8.png)
C language - Introduction - Foundation - syntax - [operators, type conversion] (6)

How should PMP learning ideas be realized?
随机推荐
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
【leetcode】540. A single element in an ordered array
How do microservices aggregate API documents? This wave of show~
What is uid? What is auth? What is a verifier?
Investment analysis and future production and marketing demand forecast report of China's paper industry Ⓥ 2022 ~ 2028
LeetCode 74. Search 2D matrix
《网络是怎么样连接的》读书笔记 - Tcp/IP连接(二)
Opencv environment construction (I)
Langage C - démarrer - base - syntaxe - [opérateur, conversion de type] (vi)
Target detection -- intensive reading of yolov3 paper
2022-2028 global special starch industry research and trend analysis report
Global and Chinese market of air fryer 2022-2028: Research Report on technology, participants, trends, market size and share
Launpad | 基礎知識
Development trend and market demand analysis report of high purity tin chloride in the world and China Ⓔ 2022 ~ 2027
C language - Introduction - Foundation - syntax - [operators, type conversion] (6)
Summary of the most comprehensive CTF web question ideas (updating)
C语言-入门-基础-语法-数据类型(四)
The child container margin top acts on the parent container
You can see the employment prospects of PMP project management
《网络是怎么样连接的》读书笔记 - 集线器、路由器和路由器(三)