Most efficient way to create a log file in a release build

Hi all,
I’d like to hear from developers what they do to enable users to email log files from their app

I know ngCordova has a writefile plugin, but I am not sure if its a good option to keep writing log records to file from a performance perspective. Any tips on best practices?

thanks

An update, I am using this plugin:

Seems to work very well, have tried on iOS and Android. I don’t have to mess with file paths, etc.

My strategy is as follows:
a) I am using a combination of console.log and key messages to the log file above
b) I’ve configured my before_prepare to strip console.logs if --release is used for building
c) within the app, I’ve added an option to email the logs directly to me (after consent)

1 Like

hi can u share the please :smiley:

Here’s a simple file logger for Ionic 2+

Full disclosure: I am the developer