I believe a regex like this should work:
^(\h*)logging\.info\(([^)]*)\)
Replace with:
$0\n$1print($2)
Description:
^ # Beginning of line
(\h*) # Get any spaces/tabs before the line and store in $1
logging\.info\( # Match 'logging.info('
([^)]*) # Get everything between parens
\) # Match closing paren
Note that the above regex assumes there are no other parens within the logging.info
function.
The replace means:
$0 # Whole match
\n # Newline
$1 # Place the indentation
print( # 'print('
$2 # The part within the `logging.info` function
) # Closing paren