Replace `print` with `logging` for better flexibility when managing logs.
Replace
printwithloggingfor better flexibility when managing logs.