Added first implementation of logging mechanism.