1. A method, comprising: logging trace messages in a tree data structure generated during execution of programming code in a trace log; deleting the logged trace messages logged during execution of a portion of the programming code from the tree data structure in the trace log when the portion of programming code executes without an error, wherein deleting the logged trace messages includes deleting logged trace message lower than a level designated within tree data structure, wherein each portion of the programming code has an associated level in the tree data structure; keeping the logged trace messages in the trace log when an error occurs during execution of the portion of the programming code; and outputting the trace log when execution of the programming code ends.