Tune logging levels in Production without recompiling code

IAP Software Development Practice JournalThis article first appeared in Software Development Practice, Issue 1, published by IAP (ISSN 2050-1455) 

Abstract

When raising log events in code it can be difficult to choose a severity level (such as Error, Warning, etc.) which will be appropriate for Production; moreover, the severity of an event type may need to be changed after the application has been deployed based on experience of running the application. Different environments (Development (Dev), User Acceptance Testing (UAT), Non-Functional Testing (NFT), Production, etc.) may also require different severity levels for testing purposes. We do not want to recompile an application just to change log severity levels; therefore, the severity level of all events should be configurable for each application or component, and be decoupled from event-raising code, allowing us to tune the severity without recompiling the code.

A simple way to achieve this power and flexibility is to define a set of known event IDs by using a sparse enumeration (enum in C#, Java, and C++), combined with event-ID-to-severity mappings contained in application configuration, allowing the event to be logged with the appropriate configured severity, and for the severity to be changed easily after deployment.

Continue reading Tune logging levels in Production without recompiling code

GOOS at 7digital – Code Shapes, the Purpose of Tests, and Logging Done Well

I recently went to a Devs in the ‘Ditch meetup at 7digital to hear Chris O’Dell (@ChrisAnnODell) explain 7digital’s journey to Continuous Delivery and Steve Freeman (@sf105) speak on GOOS and system testing. We had some useful discussions on dependency injection and how to use logging well, and Steve’s perspectives on ‘code shapes’ and the purpose of tests were revealing.

Continue reading GOOS at 7digital – Code Shapes, the Purpose of Tests, and Logging Done Well

How build & deployment shapes software architecture – WebPerfDays 2012

It was a privilege to be part of the first WebPerfDays EU in London on 5th October 2012. Together with the folks from CCPGames, I facilitated a session on Continuous Delivery, opening the discussion with an overview of how build & deployment shapes software architecture at thetrainline.com:

Slides: How build and deployment shapes software architecture at thetrainline.com

The Continuous Delivery session prompted some excellent discussions around CD; there seems to be interest in setting up a London-based meetup, which I agreed to help coordinate.

Kudos to Steve Thair (@TheOpsMgr) and team for organizing such an excellent event.

 

Talk: How build and deployment should shape software architectures – IASA Ignite talks

I gave an ignite talk* at IASA UK’s second ignite series, slightly cryptically entitled “Architecting the Impossible“. Having seen just how strongly build and deployment concerns can shape the software that we put into production, I spoke on How build and deployment should shape software architectures, ending with the slightly (and deliberately) controversial point that:

software architecture  is a function of build and deployment concerns (for some systems)

The slides are on SlideShare and SpeakerDeck:

architecture = f (build & deploy)   ...   [for some systems]

Thanks to the good folks at IASA, especially Matt Deacon, and Endava, who hosted the event in London.

*(5 mins, 20 slides, 15 secs per slide, auto-forwarding)

Moving a News Website to a Different Content Management System

How does a small but nationally visible non-profit organisation go about moving their news-focused website to a different content management system? A good friend of mine works for a non-profit news organisation and asked me this question recently, so I put together some very brief notes based on some of the website migrations I have done over the last few years for similar organisations (a charity, an industry trade body, and a specialist news publisher).

moving books

The client being a small non-profit organisation constrains the solution to license-free (non-commercial) content management system (CMS), because at an industry standard of around $20k and upwards, the license costs for commercial CMS products tend to be out of the range of small non-profit budgets.

There are therefore five key things to consider for migrating an existing news-focused website for a non-profit organisation to a new CMS:

  1. What open-source technology should you use?
  2. To what extent should you customise the technology and how?
  3. What is a reasonable cost – one-off and ongoing support?
  4. Who should undertake the implementation?
  5. Where should the site be hosted?

There are plenty of other problems to solve once the initial decisions have been taken, but for a simple, news-focused website, with content only in English, we don’t need to worry about managing translations or dealing with transactional workflows. So what’s next?

Continue reading Moving a News Website to a Different Content Management System