The log4net local environment is fine, the production environment cannot output logs

The log4net output log is roughly divided into two parts

1. Problems in programming code

2. Configuration file problem

When the program can output logs normally locally and the configuration files are also available normally, after publishing to the production environment, some programs can output logs, and some programs cannot. There is no problem with the program and the configuration file. The reason why the log cannot be output may be caused by the file directory permissions of the win server system. At present, I found that a program in the production environment seems to have exclusive permissions to a directory, and other programs cannot output logs to this location again, and can only be set separately for each program. A log4net configuration file and a new output directory can be specified. If different log4net configuration files are written to the same directory, there will be a problem that the program cannot output.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324836136&siteId=291194637