Svante Seleborg
Sep 2, 2010
  8985
(3 votes)

log4net Remote Logging Service released

If you ever had to look at more than one log4net log file from EPiServer, or you have had more than one site log to the same log file, this is for you.

I have released the log4net Remote Logging Server Service project to codeplex. It's not much actual code, but I could not find it ready-made for use anywhere else, so I made this for myself and also for you!

It’s been a huge life- and time-saver for myself in any situation where there is more than one log4net log file to inspect – which is pretty much every project I’ve been involved in…

It’s also solved all my issues with having EPiServer log different sites to the same file (issues such as no logging, overwritten logs at rollover etc).

You can:

  1. Consolidate all your log4net logs from your sites and servers to a single log via the built-in log4net .NET Remoting Appender.
  2. Solve all issues with simultaneous writes to the log file, lost logs during roll-over etc.
  3. Browse all logs from all systems in a single log file.

Get it at http://log4netremotelogging.codeplex.com/, either a ready-made Windows Installer MSI package or the full source code in C# for Visual Studio 2008.

Sep 02, 2010

Comments

Sep 21, 2010 10:33 AM

Nice!

Sep 21, 2010 10:33 AM

Is it an idea to log errors locally too? Just in case there is a network error... or... hm... - if we're unable to log over remoting due to network errors, the site will be in a much worse shape I guess.

I have considered logging to the database (using a custom database appender), but have put it off, as important database problems would not be logged.

The remote logging is a really good idea, I'll check it out.

Svante Seleborg
Svante Seleborg Sep 21, 2010 10:33 AM

It's certainly useful to have several appenders active at the same time. I regularily have UDP-logging on in order to be able to 'listen in' easily, and also an e-mail appender filtering Fatal-level logs so I'll get an e-mail if something really bad happens. Provided the network is up of course ;-)

The beauty of log4net (and similar frameworks) is the capability to instrument your code in one place independent of the number and location of actual logging targets. Also note that you can log differently to different appenders, it's more flexible than just being able to redirect the output.

So, sure, log it to a local RollingFileAppender as well as a 'backup'.

In actual practice my experience with it for the last couple of months have actually been 100% uptime. I lost many more logs before, due to EPiServer simultaneous access to the logfile in enterprise-mode.

Please login to comment.
Latest blogs
Opti ID overview

Opti ID allows you to log in once and switch between Optimizely products using Okta, Entra ID, or a local account. You can also manage all your use...

K Khan | Jul 26, 2024

Getting Started with Optimizely SaaS using Next.js Starter App - Extend a component - Part 3

This is the final part of our Optimizely SaaS CMS proof-of-concept (POC) blog series. In this post, we'll dive into extending a component within th...

Raghavendra Murthy | Jul 23, 2024 | Syndicated blog

Optimizely Graph – Faceting with Geta Categories

Overview As Optimizely Graph (and Content Cloud SaaS) makes its global debut, it is known that there are going to be some bugs and quirks. One of t...

Eric Markson | Jul 22, 2024 | Syndicated blog

Integration Bynder (DAM) with Optimizely

Bynder is a comprehensive digital asset management (DAM) platform that enables businesses to efficiently manage, store, organize, and share their...

Sanjay Kumar | Jul 22, 2024

Frontend Hosting for SaaS CMS Solutions

Introduction Now that CMS SaaS Core has gone into general availability, it is a good time to start discussing where to host the head. SaaS Core is...

Minesh Shah (Netcel) | Jul 20, 2024

Optimizely London Dev Meetup 11th July 2024

On 11th July 2024 in London Niteco and Netcel along with Optimizely ran the London Developer meetup. There was an great agenda of talks that we put...

Scott Reed | Jul 19, 2024