Adding external logging support to AWS

As you know, I like the AWS (Ada Web Server) project a lot, and I have on previous occasions submitted patches to them, when I felt I had a contribution worthwhile bothering the AWS developers with.

This is one such occasion.

Together with a bunch of Ada-DK guys, I’ve started a new business called AdaHeads K/S, and we plan on using AWS heavily, and one of the small “annoyances” we stumbled on, was the fact that AWS could only log it’s activity and error log data to a local file. This is both potentially inefficient under heavy load, and it is a real security issue if the server is compromised, because the attacker then have easy and unlimited access to the log data.

So we really wanted to enable AWS to send its log data to something like syslogd, and as luck would have it, another AdaCore package could help us do just that: GNATColl. This little marvel of a package can talk to syslogd, so now all that was needed was a way to connect AWS to said functionality.

And that’s just what I’ve done. Or rather, I’ve written a patch that gives AWS users the ability to send access and/or error log data to an external procedure. This procedure can then make use of GNATColl’s Traces.Syslog package to handle the log data. Obviously this also opens up the possibility of sending the log data to wherever it might suit a given AWS user. You don’t have to use GNATColl. It’s a very flexible and basic system really. My hope is that even if the AWS developers dismiss my patch, for one reason or another, they’ll at least consider adding the functionality to AWS, because it really is a dealbreaker for the AdaHeads project if AWS can’t do logging to an external service such as syslogd.

We’ll be keeping our fingers crossed.

Leave a Reply