2

I have a couple of ASP.NET web applications I am testing and have set them up with Loggly using their appender for Log4net.

Now, logging seems to be fine but I can't seem to find a way (using log4 loggly appender) to specify an application name so that when I am at Loggly's dashboard I can filter them out and see only the logs of a particular application.

Lord of Scripts
  • 3,579
  • 5
  • 41
  • 62

1 Answers1

3

You can't specify an application name using HTTP/S Event Endpoint (Loggly log4net appender uses it inside), this feature is available only for syslog. (Here is the answer on this issue from Loggly support)

You should use Tags to limit your searches to specific groups of related logs. You can specify tags in config file using UserAgent property:

<appender name="LogglyAppender" type="log4net.loggly.LogglyAppender, log4net-loggly">
    <rootUrl value="https://logs-01.loggly.com/" />
    <inputKey value="********-****-****-****-************" />
    <userAgent value="TagOne,TagTwo,TagThree" />
</appender>
  • You have to separate the tags using / not comma. Then the tags appear in loggly in the tab on the left side.https://community.loggly.com/customer/en/portal/questions/9548214-how-to-add-tags-using-log4net-config-asp-net-?b_id=50&new=9548214 – DavidJBerman Nov 06 '14 at 23:42
  • Unless I'm looking at a different support question, I think the link to it is now https://community.loggly.com/customer/portal/questions/4628556-how-do-i-send-host-and-application-using-loggly-api?b_id=50 – Andrew Grimm Oct 18 '18 at 00:46