Closed wjdavis5 closed 8 years ago
Hello just wondered if you had any comments on this. Thanks.
Hi, yes I'm planning to merge the request and this(https://github.com/jjchiw/gelf4net/pull/29) one tonight and remove the Debug.WriteLine
(https://github.com/jjchiw/gelf4net/pull/25)
Run some tests and generate the nuget package.....
Thanks.
I'm testing AsyncGelfUdpAppender
and it seems is not logging, I'm using the examples project that are in the repo another thing that I noticed it's that the application it doesn't close. I created a branch (https://github.com/jjchiw/gelf4net/tree/async-appenders) that I will look for it during the day
Hello, this is obviously not the same feature as the one in this PR, but I just wanted to let you know that there is another project that lets any appender be Async: https://github.com/cjbhaines/Log4Net.Async
Hrm. I'll take a look to see whats going on too
@uttg I tested the Async Appender and it works with <param name="IncludeLocationInformation" value="false" />
it seems the message.File = loggingEvent.LocationInformation.FileName;
LocalInformation
is null...
I'm testing (AsyncForwardingAppender
) using SimpleConsoleApplication
and it has the same problem that the implementation AsyncGelfUdpAppender
it seems it doesn't exit the application.
And I also tested ParallelForwardingAppender
and this one it does exit the application.
About the implementation of AsyncGelfUdpAppender
and AsyncGelfAmqpAppender
I don't know why it's not logging the events. I'll give it a try tomorrow
:)
Ok, I found the error, it seems that if IncludeLocationInformation
is set as true
the gelfmessage is sent like this
{
"facility": "RandomPhrases",
"file": "?",
"host": "host",
"level": 7,
"line": "?",
"timestamp": "1448360742.04914",
"version": "1.0",
"LoggerName": "SimpleConsoleApplication.Program",
"full_message": "[3] Program - Randomizer Sentence: yay",
"short_message": "[3] Program - Randomizer Sentence: yay",
"_app": "RandomSentence",
"_version": "1.0",
"_Environment": "Dev",
"_Level": "DEBUG"
}
The line
property with the character ?
it's what graylog doesn't like MapperParsingException[failed to parse [line]]; nested: NumberFormatException[For input string: "?"];
Ok, so, what do you think?
Async~Appenders
doesn't log the file an line and IncludeLocationInformation
should be set as false
(default)The issue that when we use Async~Appenders
and the Console (SimpleConsoleApplication) doesn't close, will check it later
Could you send me the example app you are using to test with that isnt closing? We are using this in production today and not having this issue.
Thanks,
I'm using SimpleConsoleApplication
that exists in the repository https://github.com/jjchiw/gelf4net/tree/master/examples
New Appenders
Upgraded to the latest version of all dependencies.