Log4Net custom appender : How to logs messages that will wrote using the Custom appender?

后端 未结 1 964
面向向阳花
面向向阳花 2020-12-30 10:15

Issue was solved - I edit this post with the right code.

I am trying to wrote the \"main\" function that initialize the log4net logger + attachment

相关标签:
1条回答
  • 2020-12-30 10:33

    The value to use for the type attribute is a fully-qualified name of the class. This is the full path to the class for the appender (namespace + class name), followed by the name of the assembly that it is in. For your code, this will be (assuming that your assembly is called WindowsFormsApplication1 - you can check this in the properties of your project):

    <appender name="MessageBoxAppender"
        type="WindowsFormsApplication1.MessageBoxAppender, WindowsFormsApplication1">
    </appender>
    
    0 讨论(0)
提交回复
热议问题