Hi @Pearl Ding , Welcome to Microsoft Q&A,
You can refer to this issue that has been discussed for a long time.:Log4net won't log to console (WinForms app).
You can learn it on Log4Net's GitHub, or you can choose other logging providers:
Best Regards,
Jiale
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.