The provided macro near_envlog makes every contract invocation loggable. To log it uses near_sdk::env::log.
near_envlog
near_sdk::env::log