mintlayer-core icon indicating copy to clipboard operation
mintlayer-core copied to clipboard

Logging interface tap_error_log prints the wrong source crate

Open TheQuantumPhysicist opened this issue 2 years ago • 2 comments

When prints happen from tap_error_log, the source of the error is lost and the source is considered to be the utils crate itself. This is undesirable as it hides the source of problems. We should find a way to get around this.

TheQuantumPhysicist avatar Aug 07 '23 15:08 TheQuantumPhysicist

Horrible hacks aside, I am afraid it probably needs to be implemented as a macro to support this.

iljakuklic avatar Aug 08 '23 14:08 iljakuklic

Horrible hacks aside, I am afraid it probably needs to be implemented as a macro to support this.

Yep. I can see that's the only way. Though we have to at least acknowledge and study this because it's causing damage in debugging.

Another solution, btw, is code duplication... not the best either.

TheQuantumPhysicist avatar Aug 08 '23 14:08 TheQuantumPhysicist