Added chanlogs module

Added a module to do per-channel logging. There's a fair amount of duplicated code here; if someone has some suggestions for how I can clean up that duplication, I would really appreciate it!