windows: Fix sometimes log error messages don't show the crate name (#18706)
On windows, path could be something like `C:\path\to\the\crate`. Hence,
`split('/')` would refuse to work in this case.
### Before

### After

Release Notes:
- N/A J
Junkui Zhang committed
8d6fa9526e076c7cf6e805fc0d73630162e0a81c
Parent: fd22c9b
Committed by GitHub <noreply@github.com>
on 10/3/2024, 8:00:33 PM