jjchiw / gelf4net

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

could not create appender #55

Closed raynaldgirard closed 6 years ago

raynaldgirard commented 6 years ago

Hello,

I'm using the GelfAmqpAppender but I do not want my messages to be GZip before being sent to RabbitMQ.

I changed the GzipMessage function to remove the GZip. To recomile without error and I replace the DLL Gelf4Net.dll in my solution by my version.

Now, I have this error message "could not create appender".

log4net:ERROR Could not create Appender [GelfAmqpAppender] of type [Gelf4Net.Appender.GelfAmqpAppender, Gelf4Net]. Reported error follows. System.MissingFieldException: Champ introuvable : 'RabbitMQ.Client.ConnectionFactory.HostName'. à Gelf4Net.Appender.GelfAmqpAppender.InitializeConnectionFactory() à Gelf4Net.Appender.GelfAmqpAppender.ActivateOptions() à log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender(XmlElement appenderElement) log4net:ERROR Appender named [GelfAmqpAppender] not found.

Could you help me ?

thank you very much

jjchiw commented 6 years ago

I think that if you only Build the project, what it's missing is the ILMerge with the RabbitMQ.Client.dll

Build the library with cake

> build.ps1

raynaldgirard commented 6 years ago

OK, I'll check that. By the way why are you GZip the message ?

jjchiw commented 6 years ago

Graylog accepts both compressed/uncompressed

http://docs.graylog.org/en/2.3/pages/gelf.html

And I thought it was better to send the message compressed :)