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


#1

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


#2

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)


#3

hi can u share the please :smiley:


#4

Here’s a simple file logger for Ionic 2+

Full disclosure: I am the developer