NativeScript tracing
A NativeScript module providing basic tracing actions for Android and iOS.
License
This is released under the MIT License, meaning you are free to include this in any type of program -- However for entities that need a support and/or a commercial license please contact me at http://nativescript.tools.
I also do contract work; so if you have a module you want built for NativeScript (or any other software projects) feel free to contact me nathan@master-technology.com.
Installation
Run tns plugin add nativescript-tracing
from inside your main project's directory:
Usage
To use the tracing module you must first require()
it from your project's node_modules
directory:
var Tracing = ;
Methods
Tracing(class, options);
Parameters
- class: your class you want to add tracing too
- (optional) options object:
** disableAddedFunction - This will disable adding the option "tracing" function that will disable/enable the console logging. ** ignore - array of functions that you don't want to add tracing too. - RETURNS: Nothing
// my-page.jsvar Sqlite = ;var Tracing = ; ; var db_promise = "MyTable" { if err console; else // This should ALWAYS be true, db object is open in the "Callback" if no errors occurred console; // Yes }; db_promise;
This should output something like:
- Starting Sqlite: MyTable, (callback)
- Starting isOpen
- Ending isOpen Are we open (callback)
- Starting isOpen
- Ending isOpen Are we open (Promise)
- ---- PLEASE note if we hadn't put the "close" in the ignore array it would have shown up here
- Ending Sqlite: MyTable