Let's see how your current regular expression is parsing the line in question:
.*|logger| .* |"|[\w.:-_()\[\]]*|"|\s*|,
| | | | | | |
|logger|.info("URL:\n\"{}\|"|\n |"| |,
It's picking up the third quotation mark as the first one in the regular expression.
To fix, you want to be sure that the ".*"s don't grab more than you want them to.
[^"\n]*logger[^"\n]*"[\w.:-_()\[\]]*"\s*,
Also, there are a few other mistakes in your current regex:
[ :-_ ] includes all characters in the ascii range 58 to 95. if you want to include a minus sign in a character set, it must go first.
[-\w.:_()\[\]]
It's good style to use raw strings for regular expressions, as you know that backslashes will be backslashes instead of triggering an escape sequence.
re.search(r'...', line)
You want to make sure the "\s*, really gets the end of the string, there could be a \",{} at the end you don't catch , so match an end of line in your regex ...$
all together, these suggestions would make your line of code:
re.search(r'[^"\n]*logger[^"\n]*"[-\w.:-()\[\]]*"\s*,$', line)