Fix syslog logic checks for `file://`, `tcp://` and `udp://`. Fixes #7754.
Merge pull request #7853 from s0undt3ch/issues/7754

Fix syslog logic checks for `file://`, `tcp://` and `udp://`. Fixes #7754