Bug #25546
lingering as far back as I can tell (i.e. v3_15_*) -- trace from a header before a trace from non-header mess
0%
Description
If, at runtime, a trace from a header file is executed before a trace from the compilation unit, the
TRACE_NAME for the compilation is ignored/overridden.
headerA.h:
#include "TRACE/trace.h"
static inline void headerA(void)
{
TLOG << "hello";
}
header.cc:
#include "TRACE/trace.h"
#include "headerA.h"
#define TRACE_NAME "header"
int main(/*int argc, char argv[]/)
{
headerA();
TLOG << "hello";
return (0);
} // main
output:
02-23 02:45:38.626276 headerA INFO headerA(): hello
02-23 02:45:38.626308 headerA INFO main(): hello <------<<< name should be "header"
History
#1 Updated by Ron Rechenmacher about 2 months ago
- Status changed from New to Resolved
This rarely happens; it actually hasn't happened yet -- just in testing.
The solution, if it does happen and GNUC || clang, is to use BASE_FILE.
Else adjust the code to make sure a trace from the "base file" occurs first.
#2 Updated by Ron Rechenmacher about 2 months ago
- Status changed from Resolved to Closed