jjchiw / gelf4net

GELF log4net Appender - graylog2
MIT License
63 stars 59 forks source link

Gelf always write a warning message to stdout after specified %level to in additionalfields #67

Closed surachai-tep closed 5 years ago

surachai-tep commented 5 years ago

Hi, We've found the following line of message has been written down to stdout all the time. I'm not sure for what's wrong with our level's configuration.

------------------------STDOUT------------- log4net: Converter [level] Option [] Format [min=-1,max=2147483647,leftAlign=False] log4net: Converter [level] Option [] Format [min=-1,max=2147483647,leftAlign=False] log4net: Converter [level] Option [] Format [min=-1,max=2147483647,leftAlign=False]

------------- Appender Configuration -----------

<appender name="AsyncGelfHttpAppender" type="Gelf4Net.Appender.AsyncGelfHttpAppender, Gelf4Net">
        <url value="http://10.94.24.104:12201/gelf" />
        <bufferSize value="200" />
        <threads value="2" />
        <layout type="Gelf4Net.Layout.GelfLayout, Gelf4Net">
            <param name="AdditionalFields" value="App:Web,Version:2.0,Level:%level" />
            <param name="Facility" value="webapp" />
            <param name="IncludeLocationInformation" value="false" />
            <param name="LogStackTraceFromMessage" value="true" />
            <param name="SendTimeStampAsString" value="false" />
        </layout>
    </appender>

Could you please suggest for how to prevent these line of message? Thank you very much,

jjchiw commented 5 years ago

Hi

I just tested the samples and if you don't want to show those messages you should turn off log4net.Internal.debug or just don't set it, since the default value is false

<appSettings>
    <add key="log4net.Internal.Debug" value="false" />
  </appSettings>

In all the samples I have log4net.Internal.debug turned on....

There is nothing wrong with the level's configuration

surachai-tep commented 5 years ago

Hi jjchiw, You're correct. It was because my internal debug flag. Thank you very much,