There's also the question whether side effects (IO) are involved in the logging or not. Can it fail (silently)? Is it synchronous ? Does the source care about all of this?
Damned, decent logging can be hard ;)
The use of print was also endorsed by the twelve-factor methodology[1]
and for simple cloud based applications, it could be as simple as that.
[1] https://12factor.net/logs