Myk Melez <mailto:[email protected]>
2014 May 12 at 09:09
Mobillians!

I just landed bug 1004825, which adds prioritized, tagged logging to the JavaScript code in Fennec with an API that resembles android.util.Log.

https://bugzilla.mozilla.org/show_bug.cgi?id=1004825

To use it, import the module and then call its v, d, i, w, or e functions:

let Log = Cu.import("resource://gre/modules/AndroidLog.jsm", {}).AndroidLog;
Log.v("MyModule", "This is a verbose message.");
Log.d("MyModule", "This is a debug message.");
Log.i("MyModule", "This is an info message.");
Log.w("MyModule", "This is a warning message.");
Log.e("MyModule", "This is an error message.");
This morning I inbounded bug 1046156.

    https://bugzilla.mozilla.org/show_bug.cgi?id=1046156

It lets you bind AndroidLog to a tag:

let Log = Cu.import("resource://gre/modules/AndroidLog.jsm", {}).AndroidLog.bind("MyModule");
Log.v("This is a verbose message.");
Log.d("This is a debug message.");
Log.i("This is an info message.");
Log.w("This is a warning message.");
Log.e("This is an error message.");

-myk

_______________________________________________
mobile-firefox-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to