I don't entirely understand why at the moment, but it looks like:
1. The logger package I wrote logs 200s, 300s, and 500s, but not 400's (i.e. 404s; important).
I could write some hacky, special-purpose code in my particular project, but IMO it should be possible for one logging system to log all requests, a la express. People trying to figure out how to use restify need feedback from the system to understand what's going on, at least if they think like me.
From what I can tell, my guess is that (1) happens because of the special-purpose handling given to 404s by emitRouteError, except that this doesn't make sense because 404s get a json response which presumably comes from res.send, which means httpResponse.end is called, which means that 'finish' is emitted, which ought to trigger the logger. But it doesn't.
And my guess was that (2) happens because of the special handling of general errors (server.js's createServer, line 81, "server.on('uncaughtException',...)"), in which the 'after' event is not emitted as normal.
Or not. Like I say, I don't really understand it yet.
Just for fun, I tried sticking server.emit('after') at the end of the callback on line 81, activating the type-(2) logger, and browsing a route with an error (reading a property of null). The result was it printed the stack trace and crashed rather than logging anything or continuing.