Don't depend internally on LOG_ constants

As they are not available on all platforms
Merge pull request #5141 from AD7six/3.0-windows-log-level

Don't depend internally on LOG_ constants