Ionic Store log or .txt Files


I want to create a very simple logger that logs into a .txt file, in order to track bugs later. I searched a lot on the internet, but couldn’t find any lead on how to do it.
I tried used @ionic-native/file, but the file.dataDirectory is returning null.

So all what I need is to create a basic text file and save it in the phone (to retrieve it later).
Any idea on how to do that?

Follow this post Medium