Adding the Logger Plugin

Install the Logger plugin using the Cordova command line interface.

Prerequisites
Task

  1. Add the Logger plugin by entering the following at the command prompt, or terminal:

    On Windows:

    cordova -d plugin add <SDK_HOME>\MobileSDK3\KapselSDK\plugins\logger

    On Mac:

    cordova -d plugin add ~<SDK_HOME>/MobileSDK3/KapselSDK/plugins/logger

    Note: The path you enter to the Kapsel plugin must be the absolute path (not relative path).
  2. (Optional) To see a list of installed plugins in your Cordova project, open a command prompt or terminal window, navigate to your Cordova project folder, and enter:
    cordova plugins
    The Cordova command line interface returns a JSON array showing installed plugins, for example:
    [ 'org.apache.cordova.core.camera',     
    'org.apache.cordova.core.device-motion',     
    'org.apache.cordova.core.file' ] 

    In this example, the Cordova project has the Cordova core Camera, Accelerator (device-motion), and File plugins installed.

  3. Modify the files in the www folder for the project as necessary, then copy them to the platform directories by running:
    cordova -d prepare android
    cordova -d prepare ios 
  4. Use the Android IDE or Xcode to deploy and run the project.
    Note: If you are using an iOS device, remember to add the "clienthubEntitlements" to the Keychain Groups in the Entitlement section in Xcode.
Related tasks
Adding the AppUpdate Plugin
Adding the Logon Plugin
Adding the AuthProxy Plugin
Adding the Push Notification Plugin
Adding the EncryptedStorage Plugin
Adding the Settings Plugin
Creating an Apache Cordova Project
Related reference
Setting Up the Development Environment