M2 Enhanced TraceError Blog
Back to blog
Everyone 18 views

M2 Enhanced TraceError

What is this “Enhanced TraceError”?

I hate the long, tedious coding style when I’m coding.

Old Example:

import dbg
value = 15
dbg.TraceError(‘Testing Code {}’.format(value))

syserr output
0717 14:46:21398 :: Testing Code 15

This output is very cumbersome and I have to keep repeating the ‘import’ statement over and over again.
It doesn’t show in which file and on which line the output was generated.
I’ve improved this significantly.

New Example:

value = 15
printb(‘Testing Code {}’.format(value))

syserr output
0717 14:46:21398 :: [Name:intrologin.py Line:188] Testing Code 15

Downloads