jjchiw / gelf4net

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

AsyncGelfUdpAppender with Graylog 4 #77

Closed stoyandstoyanov closed 2 years ago

stoyandstoyanov commented 2 years ago

Hi there, I am currently using Gelf4Net.UdpAppender 1.0.0.18 and Microsoft.Extensions.Logging.Log4Net.AspNetCore 3.1.0 with Graylog 3.3.16 without any issues.

After spinning up Graylog 4.2.5 UdpAppender does not work with following config.

`

<remotePort value="12201" />
<threshold value="ALL"/>
<layout type="Gelf4Net.Layout.GelfLayout, Gelf4Net.Core">
  <param name="AdditionalFields" value="Logger:%logger,Thread:%thread"/>
  <param name="Facility" value="Application"/>
  <param name="IncludeLocationInformation" value="false"/>
  <param name="ConversionPattern" value="%message%n%exception%n"/>
</layout>

`

However Gelf4Net.HttpAppender works with same Graylog version - 4.2.5 and following config.

`

<bufferSize value="2000" />
<threads value="2" />
<layout type="Gelf4Net.Layout.GelfLayout, Gelf4Net.Core">
  <param name="AdditionalFields" value="Logger:%logger,Thread:%thread"/>
  <param name="Facility" value="Application"/>
  <param name="IncludeLocationInformation" value="false"/>
  <param name="ConversionPattern" value="%message%n%exception%n"/>
  <param name="ConversionPattern" value="[%t] %c{1} - %m" />
</layout>

`

Is there incompatibility of UdpAppender with Graylog 4? Thanks.

jjchiw commented 2 years ago

I don't know...

I don't see any breaking changes or any significant that would break the udp stream

https://docs.graylog.org/docs/graylog-4-2 https://docs.graylog.org/docs/changelog

I'll make some tests during the week and tell you if I've found something

:)

stoyandstoyanov commented 2 years ago

Thanks for that. I found network issues that could potentially block my udp traffic and could cause the problem. Still I have not managed to resolve it.