Fixes #4323 - Debug logging can hide trace logging

I swapped the order of the `isTraceEnabled` and `isDebugEnabled` checks to ensure that the trace log message is used if trace is enabled.