Improve logging functionality a bit

We still probably want tags and timestamps and stuff, but I'll save that
for another day.