Answer the question
In order to leave comments, you need to log in
Who knows ready-made solutions for collecting traces?
Kotany, tell me ready-made bikes for collecting traces.
I want to:
- Output traces to the console
- Write all or selective traces to a file
- Connect remotely by the client for convenient analysis in the GUI
Cherry on the cake:
- Remote control of tracing settings from under the GUI client
Language: C || C++
It is desirable(!) that these messages are not "started" through macros. better some static object or functions.
If not, then you'll have to write your own...
Answer the question
In order to leave comments, you need to log in
It is desirable(!) that these messages are not "started" through macros. better some static object or functions.
void WriteMyTrace( char*pszTrace, ... ){
va_list ap;
FILE*f;
va_start( ap, pszTrace );
f = fopen( TRACE_FILE_NAME, "a" );
vfprintf( f, pszTrace, ap );
fclose( f );
va_end( ap );
}
...
if( !something( x, y, z ) ){
TRACE( "something [%i, %x, %s]", x, y, z );
return false;
}
if( !something_two( a, b ) ){
TRACE( "something two [%i]", b - a );
return false;
}
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question