Hello Readers,
This plugin use to show JavaScript logs in your native logs. It is very useful and add some additional functions to make it more useful.
First of all we need to install the plugin through CLI run:
$ cordova plugin add cordova-plugin-console
This plugin creates a global object i.e console. As we know when an object is global then features provided by the plugin are not accessible until we define it into device ready function.
As i said, this plugin creates global console object and also it has some methods which are as follows:
- console.log : Prints all output messages.
- console.error : Print output contain errors.
- console.exception : Print all error messages when exception occur with interaction stack trace.
- console.warn : Print all warning messages.
- console.info : Print all informational messages.
- console.debug : Print message with a hyperlink which redirect to where it was called.
These are some methods and their uses.
This plugin supports :
- Android
- iOS
- Windows 8.1
- windows 10
For more details visit: Cordova plugin console.
Hope this will help you :)
0 Comment(s)