soen / Elmah.Io.Sitecore.log4net

Enables logging to elmah.io from Sitecore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Include this as an official package

ThomasArdal opened this issue · comments

Hi Søren. Thomas, the founder of elmah.io here. Just stumbled upon this package. Can you explain what this packages does? I've been thinking about creating a client for Sitecore for some while. Maybe this repo could mature into an official elmah.io package for Sitecore?

Hi Thomas.

Thanks for reaching out and showing interest in the repo!

To summarize, this package includes a Sitecore specific log4net appender implementation, along with required Sitecore configuration, that enables logging to elmah.io. By default, the log4net implementation Sitecore uses is rather dated and wrapped inside Sitecore's own logging assemblies. In practice this means, that if you try to install your log4net appender it won't work once you run your Sitecore solution - which is where this package comes into the picture. In practice, I've simply peeked at the implementation you provided for log4net and re-implemented it using Sitecores' own extension points for their log4net appenders.

As for maturing this repo into an official package, I think that sounds like a great idea 👍

I see. That makes perfect sense and exactly what we are doing with our integration for Umbraco as well. I will look at adapting your code into an official package.

Does your package by any chance log all uncaught exceptions happening on Sitecore as well or is it only an appender for log4net? I've been in contact with Sitecore about an official supported package in the past, but I gave up after having talked with three different levels of support :(

BTW, would love to chat with your about your usage of elmah.io from Sitecore one day. In danish of course 😄

All exceptions happening within Sitecore should be logged via the code in this repo. However, I've restricted the log level to exclude traces, debugs and info's since Sitecore logs quite a great about of data otherwise.

As for my usage of elmah.io, let's see if we can find the time to chat about that 😊

Is anyone still using this? I see that it is running on the old 2.x Elmah.Io package which is no longer supported.