added methods and macros to set the format of logged messages.
added a small test/sample program.