c++ - How to print logs into file in console application in Qt creator? -


i've created in qt creator non-qt project - plain c++ application , want write information called functions in log file:

for example, program invokes function

void my_function() {    writelogs(" data "); } 

and in log file want see

my_function some_data 

try this;

  printf("%s : %s",__func__, "some data"); 

you may have slight variation depending on compiler.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -