Trouble with target=graylog #13
Replies: 12 comments
-
Hi Any hint to solve this |
Beta Was this translation helpful? Give feedback.
-
The xsi error can be ignored, https://stackoverflow.com/a/39311279. You've got a couple issues.. The first is your exception which is caused by "graylogServer="99.99.99.99"" this needs to be changed to "graylogServer="http://99.99.99.99"" or https:// depending on if you have TLS enabled. Also port 99999 is higher than what is possible, 65535 is the max port. |
Beta Was this translation helpful? Give feedback.
-
Thanks dustin Let me check again and thanks a lot!!! |
Beta Was this translation helpful? Give feedback.
-
Now I got this message 2018-07-12 15:03:51.2897 Error Parsing configuration from C:\Users\yamil\source\repos\TestNLog\NetFrameworkApp\bin\Debug\NLog.config failed. Exception: NLog.NLogConfigurationException: Exception when parsi And my NLog config file is
|
Beta Was this translation helpful? Give feedback.
-
Ok 2018-07-12 15:14:35.3416|DEBUG|NetFrameworkApp.Program|[Message=Test Log Error - NetFrameWork][Brand=AMBERCORENA][PayLoad={ Name = Pepe Trueno, Age = 35 }][AuditLogin=System] maybe is it a UDP addr ? |
Beta Was this translation helpful? Give feedback.
-
No, as you said only http y https are allowable. But I got the same error message |
Beta Was this translation helpful? Give feedback.
-
What input is on port 12201 of your Graylog server. It needs to be the Gelf HTTP one. |
Beta Was this translation helpful? Give feedback.
-
Dustin, I am afraid it is UDP ... |
Beta Was this translation helpful? Give feedback.
-
I've seen a couple, I've not used them much. For NLog I'm a fan of this one if you're willing to switch over to Serilog |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot!!!! Regards, |
Beta Was this translation helpful? Give feedback.
-
Dustin, I test with NLog.targets.gelf and works fin in .Net FrameWork and .NetCore. |
Beta Was this translation helpful? Give feedback.
-
@YamilBracho You can also use NLog.GelfLayout Then you can use UDP / TCP / HTTP as you like. See config examples here: |
Beta Was this translation helpful? Give feedback.
-
Hi
I just trying to send some information to GrayLog. I wrote in my NLog.config this 👍
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <extensions> <add assembly="NLog.Targets.GraylogHttp"/> </extensions> <targets> <target name="console" xsi:type="Console" /> <target name="graylog" xsi:type="GraylogHttp" facility="Myfacility" graylogServer="99.99.99.99" graylogPort="99999" /> </targets> <rules> <logger name="*" minlevel="Debug" writeTo="console" /> <logger name="*" minlevel="Debug" writeTo="graylog" /> </rules> </nlog>
But Visual Studio complains on line <target name="graylog" and tooltip with error message "This is an invalid xsi:type "http://www.nlog-project.org/schemas/Nlog.xsd:GraylogHttp"
Is there a way to turn off this validation ? or is it something missing ?
TIA,
Yamil
Beta Was this translation helpful? Give feedback.
All reactions