convert cout to message logger