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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -