[HELP] how to log file in arduino

hi, im still beginner in using arduino
i hve a problem with the code
i have code like this

//looping code
vol=1;
 rand =random(5000,60000);
        toneAC(rand,vol);
        delay(1000);
//code

i hv a variable rand with fill random number, i want to know that random number and save to file or i wanna see wht number is choose
its like loging to file
anyone know how to do it?

thanks