Move signal logging to the PostHook.

This change lets people use a custom logger without getting extraneous output on signals.

It also serves as a demo in how to use the hook functions. :)