Is it possible to tell Unity to ignore a function in a stack trace?

When I run Debug.Log, double-clicking the message in Unity Console brings me to the point where Debug.Log is called.

I want to write a custom Debug.Log wrapper so I can globally enable/disable levels of logging (without a bunch of if statements everywhere).

This works fine, but when I double-click the message in the Unity Console, the cursor goes to inside my custom wrapper, to where Debug.Log is being called, not the function that called my custom wrapper.

Is there a way to tell Unity to not trace into a function? I would think that we would write something similar to the [HideInInspector] or [AddComponentMenu()] inline instructions, but something that targets the debugger/logger instead of the unity editor.

I heard that if you compile your code as a dll then that happens.

Did you find a solution?