Pascal Wrapper: Implemented logging function.