Changed messages to use log mechanism rather than callback.
Added set_channel, get_channel and print_log functions