This is a simple shell app that utilizes @obsidize/rx-console and cordova-plugin-secure-logger to stream log events to a native rotating file stream.
See the LogManagerService implementation for relevant details.
NOTE: This project uses the social sharing plugin for example purposes to be able to extract the log data locally. This is for demonstration purposes only. Logs should be uploaded to a secure server in most production use cases to avoid bleeding out sensitive user data.
-
Git must be installed and available on command line
-
NVM must be installed and available on command line
# clone this repo
git clone https://github.com/jospete/ionic-native-file-logging-example.git
# cd into the fresh clone folder
cd ionic-native-file-logging-example
# make sure you're using the correct node version via nvm
nvm use
# if nvm gives a "version not found" error
# nvm install 18
# nvm use
# install project dependencies
npm install
# initialize project artificats
npm run app:init
# open android project to run it
npx cap open android
# or open ios project
# npx cap open ios