Nlog and Sentinel

1,252 views
Skip to first unread message

John Zielke

unread,
May 1, 2013, 9:57:38 AM5/1/13
to nlog-...@googlegroups.com
I have been using NLog and Sentinel to monitor log messages but it seems in the latest NLog release, that functionality no longer works.  Is there an issue writing to the UDP ports?  I have not tried TCP yet.  One project using NLog V2.0.0.0 works fine with Sentinel while another on the latest NLog does not.  

I did turn on Nlog Logging and the target is opening and closing but appears that nothing is being sent to Sentinel.  

Just wondering if others are having any issues?


John

Kim Christensen

unread,
May 1, 2013, 10:00:45 AM5/1/13
to nlog-...@googlegroups.com
Could you post the log output and the configuration?

John Zielke

unread,
May 1, 2013, 11:12:32 AM5/1/13
to nlog-...@googlegroups.com
I am basically doing the code version of the NLog Config from this website example.


The NLog.Config file configuration logging is working fine.  No issue going to files.

I will post a log when I get back to the machine. I will also upgrade the working machine to make sure it is not machine or config specific. 

John

John Zielke

unread,
May 1, 2013, 11:53:16 AM5/1/13
to nlog-...@googlegroups.com
I Upgraded to NuGet package version NLog.2.0.1.2, Sentinel no longer works

NuGet package version NLog.2.0.0.2000 worked fine with Sentinel.

Downgraded back to NLog.2.0.0.2000 and Sentinel is now working again.


Looks like the latest NUGet package might have an issue.  Both packages where published by different people.

John

Kim Christensen

unread,
May 2, 2013, 2:55:17 AM5/2/13
to nlog-...@googlegroups.com
Even though the log doesn't contain any errors it still may be helpful in figuring out what's wrong.
Could you post a simple sample project reproducing the error?
The NuGet packages is published by different persons, as Jarek no longer actively develops NLog.
Thanks in advance.

John Zielke

unread,
May 2, 2013, 1:08:25 PM5/2/13
to nlog-...@googlegroups.com
I created two projects.  One with the V2.0.0.2 DLL and one with the V2.0.1.2.  How can I get them to you?  Don't see an option to include an attachment to the post.  

Kim Christensen

unread,
May 2, 2013, 3:05:36 PM5/2/13
to nlog-...@googlegroups.com

Unfortunately Google groups don't have a way to attach files. Maybe you could upload the to github or send me a mail.

--
You received this message because you are subscribed to the Google Groups "NLog-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nlog-users+...@googlegroups.com.
To post to this group, send email to nlog-...@googlegroups.com.
Visit this group at http://groups.google.com/group/nlog-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

John Zielke

unread,
May 3, 2013, 7:49:14 AM5/3/13
to nlog-...@googlegroups.com

Sample Projects

Thanks

John

kimwo...@gmail.com

unread,
May 4, 2013, 2:31:24 PM5/4/13
to nlog-...@googlegroups.com
Thanks, I’ll take a look at it
 
Sendt fra Windows Mail

Kim Christensen

unread,
May 6, 2013, 6:40:12 PM5/6/13
to nlog-...@googlegroups.com
I can see this doesn't work in the new version, and I'm trying to figure out why. Sorry to keep you hanging.

Kim Christensen

unread,
May 6, 2013, 7:21:57 PM5/6/13
to nlog-...@googlegroups.com
I've figured out why this happens. Harvester and Sentinel doesn't seem to support the inclusion of NLog data in the Log4JXML Which are included by default in the new version. Actually I'm not totally sure if this is a bug in NLog or in the other applications I have to look into that.
The current workaround is to tell NLog not to include NLog specific data, which can be done like this:

var sentinelTarget = new NLogViewerTarget()
{
  Name = "sentinel",
  Address = "udp://127.0.0.1:9999",
  IncludeNLogData = false
};

and

var harvesterTarget = new OutputDebugStringTarget()
{
  Name = "harvester",
  Layout = "${log4jxmlevent:includeNLogData=false}"
};

John Zielke

unread,
May 7, 2013, 8:22:23 AM5/7/13
to nlog-...@googlegroups.com
Great.. Thanks for looking into this. 

I appreciate the fix.

John


--
You received this message because you are subscribed to a topic in the Google Groups "NLog-Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nlog-users/lwEe2cHxYwE/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to nlog-users+...@googlegroups.com.

Dano Loudon

unread,
May 9, 2013, 1:46:55 PM5/9/13
to nlog-...@googlegroups.com
Thanks for the work around.  Looks like Log2Console was breaking also.  The property did the trick.

Werner van Deventer

unread,
Jul 29, 2013, 2:51:04 PM7/29/13
to nlog-...@googlegroups.com
Thanks Kim. I've updated the code example in the blog post to use your workaround code since this caught me out as well after upgrading.
Reply all
Reply to author
Forward
0 new messages