How do you configure and enable log4net for a stand-alone class library assembly?

前端 未结 6 1241
走了就别回头了
走了就别回头了 2020-12-13 04:02

Background

I am writing a class library assembly in C# .NET 3.5 which is used for integration with other applications including third-party Commercial-Off-The-Shel

6条回答
  •  伪装坚强ぢ
    2020-12-13 05:05

    This works for me for a shared library

    protected static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.Assembly.GetExecutingAssembly().GetType());
    

提交回复
热议问题