I have done to print logs in the console but I have no idea how to print logs in a text file
Asked
Active
Viewed 337 times
-5
-
2Welcome to stackoverflow:) You question is too general and should contains more details about the problem you are facing. But seems your question is a duplicate of [this link](https://stackoverflow.com/questions/7627113/save-the-console-log-in-chrome-to-a-file) – Reza Torkaman Ahmadi Dec 19 '18 at 07:12
1 Answers
2
Creat a new instance of FileWriter
,I will name it fileWriter
, give it a target File
where to write. Then use the fileWriter.write()
to write into the file. When done, call fileWriter.close()
, this will save the changes to the file.

rainisr
- 304
- 3
- 15