Mainnet docs are version-pinned. Check each section's exact version in the sidebar; it can lag the newest upstream release.
Examples of logging in Sway
contract;
use std::logging::log;
abi MyContract {
fn test_func(val: u64);
}
impl MyContract for Contract {
fn test_func(val: u64) {
log(val);
}
}