I’ve been a developer for a long time. Hell, I’ve been with my current company, as a developer, for a very long time – over ten years now. And there’s one thing that has really struck me over that period of time that is the one thing that makes life easier: Logging.
You can almost never log enough. When we’ve come across problems that we don’t understand, the first thing we end up doing is adding more logging.
One of my goals in Haraka has been to ensure that issues are easy to track. Deny (5xx and 4xx to the SMTP-savvy people) messages contain a UUID which can be tracked back directly into the logs. Having sat across the developer/sysadmin divide for a number of years (ok in truth, I just had fantastically bitchy sysadmins, and I love them for that) this is HUGELY important.
A lot of developers think that writing defect free software is the most important thing. They are entirely wrong – even defect free software gets a boat load of bug reports. Most problems and expenses with software will occur after you ship it. The only way you are going to be able to track what that problem was is through extensive logging.
So my message to you, dear coder friends, is to log early, log often, and log in a way you can track it back to an individual transaction. And save logs, lots of them, for as long as you possibly can.
And for Haraka users – we are working on improving this – it will be improved in the next major release (even though it’s pretty darn good already).