Added template functions that call the class methods.

This will allow doing "log(buffer)" vs. "buffer.log()".