Bug 703059 - Fixup log tag strings [r=mfinkle]
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 17 Nov 2011 14:36:09 -0500
changeset 83520 a6a429a48e60cf01777373b5318459054c4134e7
parent 83519 3954e874ac29897ff2ca63316b380aa93154d891
child 83521 e056708c00aa9537a2750a9637d37bd26082870e
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs703059
milestone11.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 703059 - Fixup log tag strings [r=mfinkle] Standardize on "Gecko" + filename as the log tag for each file. Strip "Gecko" from the front of the filename if it already starts with "Gecko". This allows grepping for either the filename or Gecko in logcat output.
embedding/android/AlertNotification.java
embedding/android/AwesomeBar.java
embedding/android/AwesomeBarTabs.java
embedding/android/ConfirmPreference.java
embedding/android/CrashReporter.java.in
embedding/android/DoorHangerPopup.java
embedding/android/Favicons.java
embedding/android/GeckoApp.java
embedding/android/GeckoAppShell.java
embedding/android/GeckoBatteryManager.java
embedding/android/GeckoEvent.java
embedding/android/GeckoInputConnection.java
embedding/android/GeckoPreferences.java
embedding/android/GeckoThread.java
embedding/android/GlobalHistory.java
embedding/android/NotificationHandler.java.in
embedding/android/PromptService.java
embedding/android/Restarter.java.in
embedding/android/Tab.java
embedding/android/Tabs.java
embedding/android/ui/PanZoomController.java
--- a/embedding/android/AlertNotification.java
+++ b/embedding/android/AlertNotification.java
@@ -45,16 +45,18 @@ import android.net.Uri;
 import android.util.Log;
 import android.widget.RemoteViews;
 import java.net.*;
 import java.text.NumberFormat;
 
 public class AlertNotification
     extends Notification
 {
+    private static final String LOGTAG = "GeckoAlertNotification";
+
     private final int mId;
     private final int mIcon;
     private final String mTitle;
     private final String mText;
     private final NotificationManager mNotificationManager;
 
     private boolean mProgressStyle; // = false
     private double mPrevPercent  = -1;
@@ -96,17 +98,17 @@ public class AlertNotification
             view.setImageViewBitmap(R.id.notification_image, bm);
             view.setTextViewText(R.id.notification_title, mTitle);
             if (mText.length() > 0) {
                 view.setTextViewText(R.id.notification_text, mText);
             }
             contentView = view;
             mNotificationManager.notify(mId, this); 
         } catch(Exception ex) {
-            Log.e("GeckoAlert", "failed to create bitmap", ex);
+            Log.e(LOGTAG, "failed to create bitmap", ex);
         }
     }
 
     public void updateProgress(String aAlertText, long aProgress, long aProgressMax) {
         if (!mProgressStyle) {
             // Custom view
             int layout =  aAlertText.length() > 0 ? R.layout.notification_progress_text : R.layout.notification_progress;
 
--- a/embedding/android/AwesomeBar.java
+++ b/embedding/android/AwesomeBar.java
@@ -52,33 +52,33 @@ import android.text.TextWatcher;
 import android.util.Log;
 import android.view.KeyEvent;
 import android.view.View;
 import android.view.Window;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.EditText;
 
 public class AwesomeBar extends Activity {
+    private static final String LOGTAG = "GeckoAwesomeBar";
+
     static final String URL_KEY = "url";
     static final String TITLE_KEY = "title";
     static final String CURRENT_URL_KEY = "currenturl";
     static final String TYPE_KEY = "type";
     static enum Type { ADD, EDIT };
 
-    private static final String LOG_NAME = "AwesomeBar";
-
     private String mType;
     private AwesomeBarTabs mAwesomeTabs;
     private EditText mText;
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        Log.d(LOG_NAME, "creating awesomebar");
+        Log.d(LOGTAG, "creating awesomebar");
 
         requestWindowFeature(Window.FEATURE_NO_TITLE);
         setContentView(R.layout.awesomebar_search);
 
         mAwesomeTabs = (AwesomeBarTabs) findViewById(R.id.awesomebar_tabs);
         mAwesomeTabs.setOnUrlOpenListener(new AwesomeBarTabs.OnUrlOpenListener() {
             public void onUrlOpen(AwesomeBarTabs tabs, String url) {
                 openUrlAndFinish(url);
--- a/embedding/android/AwesomeBarTabs.java
+++ b/embedding/android/AwesomeBarTabs.java
@@ -70,24 +70,24 @@ import java.lang.ref.WeakReference;
 
 import java.util.Date;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 
 public class AwesomeBarTabs extends TabHost {
+    private static final String LOGTAG = "GeckoAwesomeBarTabs";
+
     private static final String ALL_PAGES_TAB = "all";
     private static final String BOOKMARKS_TAB = "bookmarks";
     private static final String HISTORY_TAB = "history";
 
     private static enum HistorySection { TODAY, YESTERDAY, WEEK, OLDER };
 
-    private static final String LOG_NAME = "AwesomeBarTabs";
-
     private Context mContext;
     private OnUrlOpenListener mUrlOpenListener;
     private View.OnTouchListener mListTouchListener;
 
     private SimpleCursorAdapter mAllPagesAdapter;
     private SimpleCursorAdapter mBookmarksAdapter;
     private SimpleExpandableListAdapter mHistoryAdapter;
 
@@ -411,17 +411,17 @@ public class AwesomeBarTabs extends TabH
 
             expandAllGroups(historyList);
         }
     }
 
     public AwesomeBarTabs(Context context, AttributeSet attrs) {
         super(context, attrs);
 
-        Log.d(LOG_NAME, "Creating AwesomeBarTabs");
+        Log.d(LOGTAG, "Creating AwesomeBarTabs");
 
         mContext = context;
 
         // Load layout into the custom view
         LayoutInflater inflater =
                 (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
 
         inflater.inflate(R.layout.awesomebar_tabs, this);
@@ -479,17 +479,17 @@ public class AwesomeBarTabs extends TabH
         tab.setContent(contentId);
 
         addTab(tab);
 
         return tab;
     }
 
     private void addAllPagesTab() {
-        Log.d(LOG_NAME, "Creating All Pages tab");
+        Log.d(LOGTAG, "Creating All Pages tab");
 
         addAwesomeTab(ALL_PAGES_TAB,
                       R.string.awesomebar_all_pages_title,
                       R.id.all_pages_list);
 
         // Load the list using a custom adapter so we can create the bitmaps
         mAllPagesAdapter = new SimpleCursorAdapter(
             mContext,
@@ -530,31 +530,31 @@ public class AwesomeBarTabs extends TabH
             }
         });
 
         allPagesList.setAdapter(mAllPagesAdapter);
         allPagesList.setOnTouchListener(mListTouchListener);
     }
 
     private void addBookmarksTab() {
-        Log.d(LOG_NAME, "Creating Bookmarks tab");
+        Log.d(LOGTAG, "Creating Bookmarks tab");
 
         addAwesomeTab(BOOKMARKS_TAB,
                       R.string.awesomebar_bookmarks_title,
                       R.id.bookmarks_list);
 
         ListView bookmarksList = (ListView) findViewById(R.id.bookmarks_list);
         bookmarksList.setOnTouchListener(mListTouchListener);
 
         // Only load bookmark list when tab is actually used.
         // See OnTabChangeListener above.
     }
 
     private void addHistoryTab() {
-        Log.d(LOG_NAME, "Creating History tab");
+        Log.d(LOGTAG, "Creating History tab");
 
         addAwesomeTab(HISTORY_TAB,
                       R.string.awesomebar_history_title,
                       R.id.history_list);
 
         ListView historyList = (ListView) findViewById(R.id.history_list);
         historyList.setOnTouchListener(mListTouchListener);
 
--- a/embedding/android/ConfirmPreference.java
+++ b/embedding/android/ConfirmPreference.java
@@ -39,16 +39,18 @@ package org.mozilla.gecko;
 
 import android.content.Context;
 import android.preference.DialogPreference;
 import android.provider.Browser;
 import android.util.AttributeSet;
 import android.util.Log;
 
 class ConfirmPreference extends DialogPreference {
+    private static final String LOGTAG = "GeckoConfirmPreference";
+
     private String mAction = null;
     private Context mContext = null;
     public ConfirmPreference(Context context, AttributeSet attrs) {
         super(context, attrs);
         mAction = attrs.getAttributeValue(null, "action");
         mContext = context;
     }
     public ConfirmPreference(Context context, AttributeSet attrs, int defStyle) {
@@ -67,11 +69,11 @@ class ConfirmPreference extends DialogPr
             });
         } else if ("clear_private_data".equalsIgnoreCase(mAction)) {
             GeckoAppShell.getHandler().post(new Runnable(){
                 public void run() {
                     GeckoAppShell.sendEventToGecko(new GeckoEvent("Sanitize:ClearAll", null));
                 }
             });
         }
-        Log.i("GeckoPref", "action: " + mAction);
+        Log.i(LOGTAG, "action: " + mAction);
     }
 }
--- a/embedding/android/CrashReporter.java.in
+++ b/embedding/android/CrashReporter.java.in
@@ -63,52 +63,52 @@ import android.util.Log;
 import android.view.View;
 import android.widget.Button;
 import android.widget.CheckBox;
 
 import org.mozilla.gecko.R;
 
 public class CrashReporter extends Activity
 {
+    private static final String LOGTAG = "GeckoCrashReporter";
+
     private static final String PASSED_MINI_DUMP_KEY = "minidumpPath";
     private static final String MINI_DUMP_PATH_KEY = "upload_file_minidump";
     private static final String PAGE_URL_KEY = "URL";
     private static final String NOTES_KEY = "Notes";
     private static final String SERVER_URL_KEY = "ServerURL";
 
     private static final String CRASH_REPORT_DIR = "/data/data/@ANDROID_PACKAGE_NAME@/files/mozilla/Crash Reports/";
     private static final String PENDING_DIR = CRASH_REPORT_DIR + "pending";
     private static final String SUBMITTED_DIR = CRASH_REPORT_DIR + "submitted";
 
-    private static final String LOG_NAME = "GeckoCrashReporter";
-
     private Handler mHandler;
     private ProgressDialog mProgressDialog;
     private File mPendingMinidumpFile;
     private File mPendingExtrasFile;
     private HashMap<String, String> mExtrasStringMap;
 
     private boolean moveFile(File inFile, File outFile) {
-        Log.i(LOG_NAME, "moving " + inFile + " to " + outFile);
+        Log.i(LOGTAG, "moving " + inFile + " to " + outFile);
         if (inFile.renameTo(outFile))
             return true;
         try {
             outFile.createNewFile();
-            Log.i(LOG_NAME, "couldn't rename minidump file");
+            Log.i(LOGTAG, "couldn't rename minidump file");
             // so copy it instead
             FileChannel inChannel = new FileInputStream(inFile).getChannel();
             FileChannel outChannel = new FileOutputStream(outFile).getChannel();
             long transferred = inChannel.transferTo(0, inChannel.size(), outChannel);
             inChannel.close();
             outChannel.close();
 
             if (transferred > 0)
                 inFile.delete();
         } catch (Exception e) {
-            Log.e(LOG_NAME, "exception while copying minidump file: ", e);
+            Log.e(LOGTAG, "exception while copying minidump file: ", e);
             return false;
         }
         return true;
     }
 
     private void doFinish() {
         if (mHandler != null) {
             mHandler.post(new Runnable() {
@@ -175,17 +175,17 @@ public class CrashReporter extends Activ
         backgroundSendReport();
     }
 
     private boolean readStringsFromFile(String filePath, Map<String, String> stringMap) {
         try {
             BufferedReader reader = new BufferedReader(new FileReader(filePath));
             return readStringsFromReader(reader, stringMap);
         } catch (Exception e) {
-            Log.e(LOG_NAME, "exception while reading strings: ", e);
+            Log.e(LOGTAG, "exception while reading strings: ", e);
             return false;
         }
     }
 
     private boolean readStringsFromReader(BufferedReader reader, Map<String, String> stringMap) throws IOException {
         String line;
         while ((line = reader.readLine()) != null) {
             int equalsPos = -1;
@@ -209,41 +209,41 @@ public class CrashReporter extends Activ
     private void sendPart(OutputStream os, String boundary, String name, String data) {
         try {
             os.write(("--" + boundary + "\r\n" +
                       "Content-Disposition: form-data; name=\"" + name + "\"\r\n" +
                       "\r\n" +
                       data + "\r\n"
                      ).getBytes());
         } catch (Exception ex) {
-            Log.e(LOG_NAME, "Exception when sending \"" + name + "\"", ex);
+            Log.e(LOGTAG, "Exception when sending \"" + name + "\"", ex);
         }
     }
 
     private void sendFile(OutputStream os, String boundary, String name, File file) throws IOException {
         os.write(("--" + boundary + "\r\n" +
                   "Content-Disposition: form-data; name=\"" + name + "\"; " +
                   "filename=\"" + file.getName() + "\"\r\n" +
                   "Content-Type: application/octet-stream\r\n" +
                   "\r\n"
                  ).getBytes());
         FileChannel fc = new FileInputStream(file).getChannel();
         fc.transferTo(0, fc.size(), Channels.newChannel(os));
         fc.close();
     }
 
     private void sendReport(File minidumpFile, Map<String, String> extras, File extrasFile) {
-        Log.i(LOG_NAME, "sendReport: " + minidumpFile.getPath());
+        Log.i(LOGTAG, "sendReport: " + minidumpFile.getPath());
         final CheckBox includeURLCheckbox = (CheckBox) findViewById(R.id.include_url);
 
         String spec = extras.get(SERVER_URL_KEY);
         if (spec == null)
             doFinish();
 
-        Log.i(LOG_NAME, "server url: " + spec);
+        Log.i(LOGTAG, "server url: " + spec);
         try {
             URL url = new URL(spec);
             HttpURLConnection conn = (HttpURLConnection)url.openConnection();
             conn.setRequestMethod("POST");
             String boundary = generateBoundary();
             conn.setDoOutput(true);
             conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
 
@@ -277,17 +277,17 @@ public class CrashReporter extends Activ
             sendPart(os, boundary, "Android_Display", Build.DISPLAY);
             sendPart(os, boundary, "Android_Fingerprint", Build.FINGERPRINT);
             sendPart(os, boundary, "Android_CPU_ABI", Build.CPU_ABI);
             if (Build.VERSION.SDK_INT >= 8) {
                 try {
                     sendPart(os, boundary, "Android_CPU_ABI2", Build.CPU_ABI2);
                     sendPart(os, boundary, "Android_Hardware", Build.HARDWARE);
                 } catch (Exception ex) {
-                    Log.e(LOG_NAME, "Exception while sending SDK version 8 keys", ex);
+                    Log.e(LOGTAG, "Exception while sending SDK version 8 keys", ex);
                 }
             }
             sendPart(os, boundary, "Android_Version",  Build.VERSION.SDK_INT + " (" + Build.VERSION.CODENAME + ")");
 
             sendFile(os, boundary, MINI_DUMP_PATH_KEY, minidumpFile);
             os.write(("\r\n--" + boundary + "--\r\n").getBytes());
             os.flush();
             os.close();
@@ -304,31 +304,31 @@ public class CrashReporter extends Activ
                 String crashid = responseMap.get("CrashID");
                 File file = new File(submittedDir, crashid + ".txt");
                 FileOutputStream fos = new FileOutputStream(file);
                 fos.write("Crash ID: ".getBytes());
                 fos.write(crashid.getBytes());
                 fos.close();
             }
         } catch (IOException e) {
-            Log.e(LOG_NAME, "exception during send: ", e);
+            Log.e(LOGTAG, "exception during send: ", e);
         }
 
         doFinish();
     }
 
     private void doRestart() {
         try {
             String action = "android.intent.action.MAIN";
             Intent intent = new Intent(action);
             intent.setClassName("@ANDROID_PACKAGE_NAME@",
                                 "@ANDROID_PACKAGE_NAME@.App");
-            Log.i(LOG_NAME, intent.toString());
+            Log.i(LOGTAG, intent.toString());
             startActivity(intent);
         } catch (Exception e) {
-            Log.e(LOG_NAME, "error while trying to restart", e);
+            Log.e(LOGTAG, "error while trying to restart", e);
         }
     }
 
     private String unescape(String string) {
         return string.replaceAll("\\\\", "\\").replaceAll("\\n", "\n").replaceAll("\\t", "\t");
     }
 }
--- a/embedding/android/DoorHangerPopup.java
+++ b/embedding/android/DoorHangerPopup.java
@@ -51,16 +51,18 @@ import android.widget.LinearLayout;
 import android.widget.LinearLayout.LayoutParams;
 import android.widget.RelativeLayout;
 
 import org.json.JSONArray;
 import org.json.JSONObject;
 import org.json.JSONException;
 
 public class DoorHangerPopup extends PopupWindow {
+    private static final String LOGTAG = "GeckoDoorHangerPopup";
+
     private Context mContext;
     private LinearLayout mContent;
 
     public DoorHangerPopup(Context aContext) {
         super(aContext);
         mContext = aContext;
 
         setBackgroundDrawable(new BitmapDrawable());
@@ -71,17 +73,17 @@ public class DoorHangerPopup extends Pop
         RelativeLayout layout = (RelativeLayout) inflater.inflate(R.layout.doorhangerpopup, null);
         mContent = (LinearLayout) layout.findViewById(R.id.doorhanger_container);
         
         setContentView(layout);
     }
 
     public void addDoorHanger(String message, String value, JSONArray buttons,
                               Tab tab, JSONObject options) {
-        Log.i("DoorHangerPopup", "Adding a DoorHanger to Tab: " + tab.getId());
+        Log.i(LOGTAG, "Adding a DoorHanger to Tab: " + tab.getId());
 
         // Replace the doorhanger if it already exists
         DoorHanger dh = tab.getDoorHanger(value);
         if (dh != null) {
             tab.removeDoorHanger(value);
         }
         dh = new DoorHanger(mContent.getContext(), value);
  
@@ -89,32 +91,32 @@ public class DoorHangerPopup extends Pop
         dh.setText(message);
         for (int i = 0; i < buttons.length(); i++) {
             try {
                 JSONObject buttonObject = buttons.getJSONObject(i);
                 String label = buttonObject.getString("label");
                 int callBackId = buttonObject.getInt("callback");
                 dh.addButton(label, callBackId);
             } catch (JSONException e) {
-                Log.i("DoorHangerPopup", "JSON throws " + e);
+                Log.i(LOGTAG, "JSON throws " + e);
             }
          }
         dh.setOptions(options);
 
         dh.setTab(tab);
         tab.addDoorHanger(value, dh);
         mContent.addView(dh);
 
         updatePopup();
     }
 
     // Updates popup contents to show doorhangers for the selected tab
     public void updatePopup() {
         Tab tab = Tabs.getInstance().getSelectedTab();
-        Log.i("DoorHangerPopup", "Showing all doorhangers for tab: " + tab.getId());
+        Log.i(LOGTAG, "Showing all doorhangers for tab: " + tab.getId());
  
         HashMap<String, DoorHanger> doorHangers = tab.getDoorHangers();
         // Hide the popup if there aren't any doorhangers to show
         if (doorHangers == null || doorHangers.size() == 0) {
             hidePopup();
             return;
         }
 
@@ -129,23 +131,23 @@ public class DoorHangerPopup extends Pop
             dh.show();
         }
 
         showPopup();
     }
 
     public void hidePopup() {
         if (isShowing()) {
-            Log.i("DoorHangerPopup", "Hiding the DoorHangerPopup");
+            Log.i(LOGTAG, "Hiding the DoorHangerPopup");
             dismiss();
         }
     }
 
     public void showPopup() {
-        Log.i("DoorHangerPopup", "Showing the DoorHangerPopup");
+        Log.i(LOGTAG, "Showing the DoorHangerPopup");
         fixBackgroundForFirst();
 
         if (isShowing())
             update();
         else
             showAsDropDown(GeckoApp.mBrowserToolbar.mFavicon);
     }
 
--- a/embedding/android/Favicons.java
+++ b/embedding/android/Favicons.java
@@ -55,17 +55,17 @@ import android.util.Log;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.HashMap;
 
 public class Favicons {
-    private static final String LOG_NAME = "Favicons";
+    private static final String LOGTAG = "GeckoFavicons";
 
     private Context mContext;
     private DatabaseHelper mDbHelper;
 
     public interface OnFaviconLoadedListener {
         public void onFaviconLoaded(String url, Drawable favicon);
     }
 
@@ -75,44 +75,44 @@ public class Favicons {
         private static final int DATABASE_VERSION = 1;
 
         private static final String COLUMN_ID = "_id";
         private static final String COLUMN_FAVICON_URL = "favicon_url";
         private static final String COLUMN_PAGE_URL = "page_url";
 
         DatabaseHelper(Context context) {
             super(context, DATABASE_NAME, null, DATABASE_VERSION);
-            Log.d(LOG_NAME, "Creating DatabaseHelper");
+            Log.d(LOGTAG, "Creating DatabaseHelper");
         }
 
         @Override
         public void onCreate(SQLiteDatabase db) {
-            Log.d(LOG_NAME, "Creating database for favicon URLs");
+            Log.d(LOGTAG, "Creating database for favicon URLs");
 
             db.execSQL("CREATE TABLE " + TABLE_NAME + " (" +
                        COLUMN_ID + " INTEGER PRIMARY KEY," +
                        COLUMN_FAVICON_URL + " TEXT NOT NULL," +
                        COLUMN_PAGE_URL + " TEXT UNIQUE NOT NULL" +
                        ");");
         }
 
         @Override
         public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
-            Log.w(LOG_NAME, "Upgrading favicon URLs database from version " +
+            Log.w(LOGTAG, "Upgrading favicon URLs database from version " +
                   oldVersion + " to " + newVersion + ", which will destroy all old data");
 
             // Drop table completely
             db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
 
             // Recreate database
             onCreate(db);
         }
 
         public String getFaviconUrlForPageUrl(String pageUrl) {
-            Log.d(LOG_NAME, "Calling getFaviconUrlForPageUrl() for " + pageUrl);
+            Log.d(LOGTAG, "Calling getFaviconUrlForPageUrl() for " + pageUrl);
 
             SQLiteDatabase db = mDbHelper.getReadableDatabase();
 
             SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
             qb.setTables(TABLE_NAME);
 
             Cursor c = qb.query(
                 db,
@@ -126,72 +126,72 @@ public class Favicons {
                 return null;
 
             String url = c.getString(c.getColumnIndexOrThrow(COLUMN_FAVICON_URL));
             c.close();
             return url;
         }
 
         public void setFaviconUrlForPageUrl(String pageUrl, String faviconUrl) {
-            Log.d(LOG_NAME, "Calling setFaviconUrlForPageUrl() for " + pageUrl);
+            Log.d(LOGTAG, "Calling setFaviconUrlForPageUrl() for " + pageUrl);
 
             SQLiteDatabase db = mDbHelper.getWritableDatabase();
 
             ContentValues values = new ContentValues();
             values.put(COLUMN_FAVICON_URL, faviconUrl);
             values.put(COLUMN_PAGE_URL, pageUrl);
 
             db.replace(TABLE_NAME, null, values);
         }
     }
 
     public Favicons(Context context) {
-        Log.d(LOG_NAME, "Creating Favicons instance");
+        Log.d(LOGTAG, "Creating Favicons instance");
 
         mContext = context;
         mDbHelper = new DatabaseHelper(context);
     }
 
     public void loadFavicon(String pageUrl, String faviconUrl,
             OnFaviconLoadedListener listener) {
 
-        Log.d(LOG_NAME, "Calling loadFavicon() with URL = " + pageUrl +
+        Log.d(LOGTAG, "Calling loadFavicon() with URL = " + pageUrl +
                         " and favicon URL = " + faviconUrl);
 
         // Handle the case where page url is empty
         if (pageUrl == null || pageUrl.length() == 0) {
             if (listener != null)
                 listener.onFaviconLoaded(null, null);
         }
 
         new LoadFaviconTask(pageUrl, faviconUrl, listener).execute();
     }
 
     public void close() {
-        Log.d(LOG_NAME, "Closing Favicons database");
+        Log.d(LOGTAG, "Closing Favicons database");
         mDbHelper.close();
     }
 
     private class LoadFaviconTask extends GeckoAsyncTask<Void, Void, BitmapDrawable> {
         private String mPageUrl;
         private String mFaviconUrl;
         private OnFaviconLoadedListener mListener;
 
         public LoadFaviconTask(String pageUrl, String faviconUrl, OnFaviconLoadedListener listener) {
             mPageUrl = pageUrl;
             mFaviconUrl = faviconUrl;
             mListener = listener;
 
-            Log.d(LOG_NAME, "Creating LoadFaviconTask with URL = " + pageUrl +
+            Log.d(LOGTAG, "Creating LoadFaviconTask with URL = " + pageUrl +
                             " and favicon URL = " + faviconUrl);
         }
 
         // Runs in background thread
         private BitmapDrawable loadFaviconFromDb() {
-            Log.d(LOG_NAME, "Loading favicon from DB for URL = " + mPageUrl);
+            Log.d(LOGTAG, "Loading favicon from DB for URL = " + mPageUrl);
 
             ContentResolver resolver = mContext.getContentResolver();
 
             Cursor c = resolver.query(Browser.BOOKMARKS_URI,
                                       new String[] { Browser.BookmarkColumns.FAVICON },
                                       Browser.BookmarkColumns.URL + " = ?",
                                       new String[] { mPageUrl },
                                       null);
@@ -205,17 +205,17 @@ public class Favicons {
             
             byte[] b = c.getBlob(faviconIndex);
             c.close();
             if (b == null)
                 return null;
 
             Bitmap bitmap = BitmapFactory.decodeByteArray(b, 0, b.length);
 
-            Log.d(LOG_NAME, "Loaded favicon from DB successfully for URL = " + mPageUrl);
+            Log.d(LOGTAG, "Loaded favicon from DB successfully for URL = " + mPageUrl);
 
             return new BitmapDrawable(bitmap);
         }
 
         // Runs in background thread
         private void saveFaviconToDb(BitmapDrawable favicon) {
             Bitmap bitmap = favicon.getBitmap();
 
@@ -223,79 +223,79 @@ public class Favicons {
             bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
 
             ContentValues values = new ContentValues();
             values.put(Browser.BookmarkColumns.FAVICON, stream.toByteArray());
             values.put(Browser.BookmarkColumns.URL, mPageUrl);
 
             ContentResolver resolver = mContext.getContentResolver();
 
-            Log.d(LOG_NAME, "Saving favicon on browser database for URL = " + mPageUrl);
+            Log.d(LOGTAG, "Saving favicon on browser database for URL = " + mPageUrl);
             resolver.update(Browser.BOOKMARKS_URI,
                             values,
                             Browser.BookmarkColumns.URL + " = ?",
                             new String[] { mPageUrl });
 
 
-            Log.d(LOG_NAME, "Saving favicon URL for URL = " + mPageUrl);
+            Log.d(LOGTAG, "Saving favicon URL for URL = " + mPageUrl);
             mDbHelper.setFaviconUrlForPageUrl(mPageUrl, mFaviconUrl);
         }
 
         // Runs in background thread
         private BitmapDrawable downloadFavicon(URL faviconUrl) {
-            Log.d(LOG_NAME, "Downloading favicon for URL = " + mPageUrl +
+            Log.d(LOGTAG, "Downloading favicon for URL = " + mPageUrl +
                             " with favicon URL = " + mFaviconUrl);
 
             BitmapDrawable image = null;
 
             try {
                 InputStream is = (InputStream) faviconUrl.getContent();
                 image = (BitmapDrawable) Drawable.createFromStream(is, "src");
             } catch (IOException e) {
-                Log.d(LOG_NAME, "Error downloading favicon: " + e);
+                Log.d(LOGTAG, "Error downloading favicon: " + e);
             }
 
             if (image != null) {
-                Log.d(LOG_NAME, "Downloaded favicon successfully for URL = " + mPageUrl);
+                Log.d(LOGTAG, "Downloaded favicon successfully for URL = " + mPageUrl);
                 saveFaviconToDb(image);
             }
 
             return image;
         }
 
         @Override
         protected BitmapDrawable doInBackground(Void... unused) {
             BitmapDrawable image = null;
             URL pageUrl = null;
 
             // Handle the case of malformed URL
             try {
                 pageUrl = new URL(mPageUrl);
             } catch (MalformedURLException e) {
-                Log.d(LOG_NAME, "The provided URL is not valid: " + e);
+                Log.d(LOGTAG, "The provided URL is not valid: " + e);
                 return null;
             }
 
             URL faviconUrl = null;
 
             // Handle the case of malformed favicon URL
             try {
                 // If favicon is empty, fallback to default favicon URI
                 if (mFaviconUrl == null || mFaviconUrl.length() == 0) {
                     faviconUrl = new URL(pageUrl.getProtocol(), pageUrl.getAuthority(), "/favicon.ico");
                     mFaviconUrl = faviconUrl.toString();
                 } else {
                     faviconUrl = new URL(mFaviconUrl);
                 }
             } catch (MalformedURLException e) {
-                Log.d(LOG_NAME, "The provided favicon URL is not valid: " + e);
+                Log.d(LOGTAG, "The provided favicon URL is not valid: " + e);
                 return null;
             }
 
-            Log.d(LOG_NAME, "Favicon URL is now: " + mFaviconUrl);
+            Log.d(LOGTAG, "Favicon URL is now: " + mFaviconUrl);
 
             String storedFaviconUrl = mDbHelper.getFaviconUrlForPageUrl(mPageUrl);
             if (storedFaviconUrl != null && storedFaviconUrl.equals(mFaviconUrl)) {
                 image = loadFaviconFromDb();
 
                 // If favicon URL is defined but the favicon image is not
                 // stored in the database for some reason, we force download.
                 if (image == null) {
@@ -305,15 +305,15 @@ public class Favicons {
                 image = downloadFavicon(faviconUrl);
             }
 
             return image;
         }
 
         @Override
         protected void onPostExecute(BitmapDrawable image) {
-            Log.d(LOG_NAME, "LoadFaviconTask finished for URL = " + mPageUrl);
+            Log.d(LOGTAG, "LoadFaviconTask finished for URL = " + mPageUrl);
 
             if (mListener != null)
                 mListener.onFaviconLoaded(mPageUrl, image);
         }
     }
 }
--- a/embedding/android/GeckoApp.java
+++ b/embedding/android/GeckoApp.java
@@ -84,17 +84,17 @@ import android.provider.*;
 import android.content.pm.*;
 import android.content.pm.PackageManager.*;
 import android.content.SharedPreferences.*;
 import dalvik.system.*;
 
 abstract public class GeckoApp
     extends Activity implements GeckoEventListener, SensorEventListener, LocationListener
 {
-    private static final String LOG_NAME = "GeckoApp";
+    private static final String LOGTAG = "GeckoApp";
 
     public static final String ACTION_ALERT_CLICK = "org.mozilla.gecko.ACTION_ALERT_CLICK";
     public static final String ACTION_ALERT_CLEAR = "org.mozilla.gecko.ACTION_ALERT_CLEAR";
     public static final String ACTION_WEBAPP      = "org.mozilla.gecko.WEBAPP";
     public static final String ACTION_DEBUG       = "org.mozilla.gecko.DEBUG";
     public static final String ACTION_BOOKMARK    = "org.mozilla.gecko.BOOKMARK";
 
     private LinearLayout mMainLayout;
@@ -126,17 +126,17 @@ abstract public class GeckoApp
     
     private static ArrayList<OnTabsChangedListener> mTabsChangedListeners;
 
     static class ExtraMenuItem implements MenuItem.OnMenuItemClickListener {
         String label;
         String icon;
         int id;
         public boolean onMenuItemClick(MenuItem item) {
-            Log.i("GeckoJSMenu", "menu item clicked");
+            Log.i(LOGTAG, "menu item clicked");
             GeckoAppShell.sendEventToGecko(new GeckoEvent("Menu:Clicked", Integer.toString(id)));
             return true;
         }
     }
 
     static Vector<ExtraMenuItem> sExtraMenuItems = new Vector<ExtraMenuItem>();
 
     public enum LaunchState {Launching, WaitButton,
@@ -190,18 +190,16 @@ abstract public class GeckoApp
     public static final String PLUGIN_ACTION = "android.webkit.PLUGIN";
 
     /**
      * A plugin that wish to be loaded in the WebView must provide this permission
      * in their AndroidManifest.xml.
      */
     public static final String PLUGIN_PERMISSION = "android.webkit.permission.PLUGIN";
 
-    private static final String LOGTAG = "PluginManager";
-
     private static final String PLUGIN_SYSTEM_LIB = "/system/lib/plugins/";
 
     private static final String PLUGIN_TYPE = "type";
     private static final String TYPE_NATIVE = "native";
     public ArrayList<PackageInfo> mPackageInfoCache = new ArrayList<PackageInfo>();
 
     String[] getPluginDirectories() {
 
@@ -384,17 +382,17 @@ abstract public class GeckoApp
                         GeckoAppShell.getHandler().post(new Runnable() {
                             public void run() {
                                 try {
                                     URL url = new URL(item.icon);
                                     InputStream is = (InputStream) url.getContent();
                                     Drawable drawable = Drawable.createFromStream(is, "src");
                                     mi.setIcon(drawable);
                                 } catch(Exception e) {
-                                    Log.e("Gecko", "onPrepareOptionsMenu: Unable to set icon", e);
+                                    Log.e(LOGTAG, "onPrepareOptionsMenu: Unable to set icon", e);
                                 }
                             }
                         });
                     }
                 }
                 mi.setOnMenuItemClickListener(item);
             }
         }
@@ -517,17 +515,17 @@ abstract public class GeckoApp
 
         // see if we can bail.
         if (uri.equals(lastUri) && title.equals(lastTitle))
             return;
 
         editor.putString("last-uri", uri);
         editor.putString("last-title", title);
 
-        Log.i(LOG_NAME, "Saving:: " + uri + " " + title);
+        Log.i(LOGTAG, "Saving:: " + uri + " " + title);
         editor.commit();
 
         GeckoEvent event = new GeckoEvent();
         event.mType = GeckoEvent.SAVE_STATE;
         event.mCharacters = getStartupBitmapFilePath();
         if (sync)
             GeckoAppShell.sendEventToGeckoSync(event);
         else
@@ -539,24 +537,24 @@ abstract public class GeckoApp
                 new Favicons.OnFaviconLoadedListener() {
 
             public void onFaviconLoaded(String pageUrl, Drawable favicon) {
                 // Leave favicon UI untouched if we failed to load the image
                 // for some reason.
                 if (favicon == null)
                     return;
 
-                Log.i(LOG_NAME, "Favicon successfully loaded for URL = " + pageUrl);
+                Log.i(LOGTAG, "Favicon successfully loaded for URL = " + pageUrl);
 
                 // The tab might be pointing to another URL by the time the
                 // favicon is finally loaded, in which case we simply ignore it.
                 if (!tab.getURL().equals(pageUrl))
                     return;
 
-                Log.i(LOG_NAME, "Favicon is for current URL = " + pageUrl);
+                Log.i(LOGTAG, "Favicon is for current URL = " + pageUrl);
 
                 tab.updateFavicon(favicon);
 
                 if (Tabs.getInstance().isSelectedTab(tab))
                     mBrowserToolbar.setFavicon(tab.getFavicon());
 
                 onTabsChanged();
             }
@@ -647,17 +645,17 @@ abstract public class GeckoApp
 
         Iterator items = mTabsChangedListeners.iterator();
         while (items.hasNext()) {
             ((OnTabsChangedListener) items.next()).onTabsChanged();
         }
     }
 
     public void handleMessage(String event, JSONObject message) {
-        Log.i("Gecko", "Got message: " + event);
+        Log.i(LOGTAG, "Got message: " + event);
         try {
             if (event.equals("Menu:Add")) {
                 String name = message.getString("name");
                 ExtraMenuItem item = new ExtraMenuItem();
                 item.label = message.getString("name");
                 item.id = message.getInt("id");
                 try { // icon is optional
                     item.icon = message.getString("icon");
@@ -682,72 +680,72 @@ abstract public class GeckoApp
                 final String duration = message.getString("duration");
                 handleShowToast(msg, duration);
             } else if (event.equals("DOMContentLoaded")) {
                 final int tabId = message.getInt("tabID");
                 final String uri = message.getString("uri");
                 final String title = message.getString("title");
                 final CharSequence titleText = title;
                 handleContentLoaded(tabId, uri, title);
-                Log.i(LOG_NAME, "URI - " + uri + ", title - " + title);
+                Log.i(LOGTAG, "URI - " + uri + ", title - " + title);
             } else if (event.equals("DOMTitleChanged")) {
                 final int tabId = message.getInt("tabID");
                 final String title = message.getString("title");
                 final CharSequence titleText = title;
                 handleTitleChanged(tabId, title);
-                Log.i(LOG_NAME, "title - " + title);
+                Log.i(LOGTAG, "title - " + title);
             } else if (event.equals("DOMLinkAdded")) {
                 final int tabId = message.getInt("tabID");
                 final String rel = message.getString("rel");
                 final String href = message.getString("href");
-                Log.i(LOG_NAME, "link rel - " + rel + ", href - " + href);
+                Log.i(LOGTAG, "link rel - " + rel + ", href - " + href);
                 handleLinkAdded(tabId, rel, href);
             } else if (event.equals("log")) {
                 // generic log listener
                 final String msg = message.getString("msg");
-                Log.i(LOG_NAME, "Log: " + msg);
+                Log.i(LOGTAG, "Log: " + msg);
             } else if (event.equals("Content:LocationChange")) {
                 final int tabId = message.getInt("tabID");
                 final String uri = message.getString("uri");
-                Log.i(LOG_NAME, "URI - " + uri);
+                Log.i(LOGTAG, "URI - " + uri);
                 handleLocationChange(tabId, uri);
             } else if (event.equals("Content:SecurityChange")) {
                 final int tabId = message.getInt("tabID");
                 final String mode = message.getString("mode");
-                Log.i(LOG_NAME, "Security Mode - " + mode);
+                Log.i(LOGTAG, "Security Mode - " + mode);
                 handleSecurityChange(tabId, mode);
             } else if (event.equals("Content:StateChange")) {
                 final int tabId = message.getInt("tabID");
                 int state = message.getInt("state");
-                Log.i(LOG_NAME, "State - " + state);
+                Log.i(LOGTAG, "State - " + state);
                 if ((state & GeckoAppShell.WPL_STATE_IS_DOCUMENT) != 0) {
                     if ((state & GeckoAppShell.WPL_STATE_START) != 0) {
-                        Log.i(LOG_NAME, "Got a document start");
+                        Log.i(LOGTAG, "Got a document start");
                         handleDocumentStart(tabId);
                     } else if ((state & GeckoAppShell.WPL_STATE_STOP) != 0) {
-                        Log.i(LOG_NAME, "Got a document stop");
+                        Log.i(LOGTAG, "Got a document stop");
                         handleDocumentStop(tabId);
                     }
                 }
             } else if (event.equals("onCameraCapture")) {
                 //GeckoApp.mAppContext.doCameraCapture(message.getString("path"));
                 doCameraCapture();
             } else if (event.equals("Tab:Added")) {
-                Log.i(LOG_NAME, "Created a new tab");
+                Log.i(LOGTAG, "Created a new tab");
                 int tabId = message.getInt("tabID");
                 String uri = message.getString("uri");
                 Boolean selected = message.getBoolean("selected");
                 handleAddTab(tabId, uri, selected);
             } else if (event.equals("Tab:Closed")) {
-                Log.i(LOG_NAME, "Destroyed a tab");
+                Log.i(LOGTAG, "Destroyed a tab");
                 int tabId = message.getInt("tabID");
                 handleCloseTab(tabId);
             } else if (event.equals("Tab:Selected")) {
                 int tabId = message.getInt("tabID");
-                Log.i(LOG_NAME, "Switched to tab: " + tabId);
+                Log.i(LOGTAG, "Switched to tab: " + tabId);
                 handleSelectTab(tabId);
             } else if (event.equals("Doorhanger:Add")) {
                 handleDoorHanger(message);
             } else if (event.equals("Doorhanger:Remove")) {
                 handleDoorHangerRemove(message);
             } else if (event.equals("Preferences:Data")) {
                 JSONArray jsonPrefs = message.getJSONArray("preferences");
                 GeckoPreferences.setData(jsonPrefs);
@@ -801,43 +799,43 @@ abstract public class GeckoApp
             } else if (event.equals("ToggleChrome:Show")) {
                 mMainHandler.post(new Runnable() {
                     public void run() {
                         mBrowserToolbar.setVisibility(View.VISIBLE);
                     }
                 });
             }
         } catch (Exception e) { 
-            Log.i(LOG_NAME, "handleMessage throws " + e + " for message: " + event);
+            Log.i(LOGTAG, "handleMessage throws " + e + " for message: " + event);
         }
     }
 
     void handleDoorHanger(JSONObject geckoObject) throws JSONException {
         final String message = geckoObject.getString("message");
         final String value = geckoObject.getString("value");
         final JSONArray buttons = geckoObject.getJSONArray("buttons");
         final int tabId = geckoObject.getInt("tabID");
         final JSONObject options = geckoObject.getJSONObject("options");
 
-        Log.i(LOG_NAME, "DoorHanger received for tab " + tabId + ", msg:" + message);
+        Log.i(LOGTAG, "DoorHanger received for tab " + tabId + ", msg:" + message);
 
         mMainHandler.post(new Runnable() {
             public void run() {
                 Tab tab = Tabs.getInstance().getTab(tabId);
                 mAppContext.mDoorHangerPopup.addDoorHanger(message, value, buttons,
                                                            tab, options);
             }
         });
     }
 
     void handleDoorHangerRemove(JSONObject geckoObject) throws JSONException {
         final String value = geckoObject.getString("value");
         final int tabId = geckoObject.getInt("tabID");
 
-        Log.i(LOG_NAME, "Doorhanger:Remove received for tab " + tabId);
+        Log.i(LOGTAG, "Doorhanger:Remove received for tab " + tabId);
 
         mMainHandler.post(new Runnable() {
             public void run() {
                 Tab tab = Tabs.getInstance().getTab(tabId);
                 if (tab == null)
                     return;
                 tab.removeDoorHanger(value);
                 mDoorHangerPopup.updatePopup();
@@ -1014,17 +1012,17 @@ abstract public class GeckoApp
                     mPluginViews.add(view);
                 } else {
                     lp = (PluginLayoutParams)view.getLayoutParams();
                     lp.reset((int)x, (int)y, (int)w, (int)h);
                     lp.repositionFromVisibleRect(mLayerController.getVisibleRect(), mLayerController.getZoomFactor(), true);
                     try {
                         mGeckoLayout.updateViewLayout(view, lp);
                     } catch (IllegalArgumentException e) {
-                        Log.i("updateViewLayout - IllegalArgumentException", "e:" + e);
+                        Log.i(LOGTAG, "e:" + e);
                         // it can be the case where we
                         // get an update before the view
                         // is actually attached.
                     }
                 }
             }
         });
     }
@@ -1160,17 +1158,17 @@ abstract public class GeckoApp
 
         if (!sTryCatchAttached) {
             sTryCatchAttached = true;
             mMainHandler.post(new Runnable() {
                 public void run() {
                     try {
                         Looper.loop();
                     } catch (Exception e) {
-                        Log.e(LOG_NAME, "top level exception", e);
+                        Log.e(LOGTAG, "top level exception", e);
                         StringWriter sw = new StringWriter();
                         PrintWriter pw = new PrintWriter(sw);
                         e.printStackTrace(pw);
                         pw.flush();
                         GeckoAppShell.reportJavaCrash(sw.toString());
                     }
                     // resetting this is kinda pointless, but oh well
                     sTryCatchAttached = false;
@@ -1272,40 +1270,40 @@ abstract public class GeckoApp
             });
             mMainLayout.addView(launchButton, 300, 200);
             return;
         }
         if (checkLaunchState(LaunchState.WaitButton) || launch(intent))
             return;
 
         if (Intent.ACTION_MAIN.equals(action)) {
-            Log.i(LOG_NAME, "Intent : ACTION_MAIN");
+            Log.i(LOGTAG, "Intent : ACTION_MAIN");
             GeckoAppShell.sendEventToGecko(new GeckoEvent(""));
         }
         else if (Intent.ACTION_VIEW.equals(action)) {
             String uri = intent.getDataString();
             GeckoAppShell.sendEventToGecko(new GeckoEvent(uri));
-            Log.i(LOG_NAME,"onNewIntent: "+uri);
+            Log.i(LOGTAG,"onNewIntent: "+uri);
         }
         else if (ACTION_WEBAPP.equals(action)) {
             String uri = intent.getStringExtra("args");
             GeckoAppShell.sendEventToGecko(new GeckoEvent(uri));
-            Log.i(LOG_NAME,"Intent : WEBAPP - " + uri);
+            Log.i(LOGTAG,"Intent : WEBAPP - " + uri);
         }
         else if (ACTION_BOOKMARK.equals(action)) {
             String args = intent.getStringExtra("args");
             GeckoAppShell.sendEventToGecko(new GeckoEvent(args));
-            Log.i(LOG_NAME,"Intent : BOOKMARK - " + args);
+            Log.i(LOGTAG,"Intent : BOOKMARK - " + args);
         }
     }
 
     @Override
     public void onPause()
     {
-        Log.i(LOG_NAME, "pause");
+        Log.i(LOGTAG, "pause");
 
         // Remember the last screen.
         mMainHandler.postDelayed(new Runnable() {
           public void run() {
               rememberLastScreen(false);
           }
         }, 500);
 
@@ -1322,17 +1320,17 @@ abstract public class GeckoApp
 
         unregisterReceiver(mConnectivityReceiver);
         unregisterReceiver(mBatteryReceiver);
     }
 
     @Override
     public void onResume()
     {
-        Log.i(LOG_NAME, "resume");
+        Log.i(LOGTAG, "resume");
         if (checkLaunchState(LaunchState.GeckoRunning))
             GeckoAppShell.onResume();
         // After an onPause, the activity is back in the foreground.
         // Undo whatever we did in onPause.
         super.onResume();
 
         // Just in case. Normally we start in onNewIntent
         if (checkLaunchState(LaunchState.Launching))
@@ -1340,17 +1338,17 @@ abstract public class GeckoApp
 
         registerReceiver(mConnectivityReceiver, mConnectivityFilter);
         registerReceiver(mBatteryReceiver, mBatteryFilter);
     }
 
     @Override
     public void onStop()
     {
-        Log.i(LOG_NAME, "stop");
+        Log.i(LOGTAG, "stop");
         // We're about to be stopped, potentially in preparation for
         // being destroyed.  We're killable after this point -- as I
         // understand it, in extreme cases the process can be terminated
         // without going through onDestroy.
         //
         // We might also get an onRestart after this; not sure what
         // that would mean for Gecko if we were to kill it here.
         // Instead, what we should do here is save prefs, session,
@@ -1359,34 +1357,34 @@ abstract public class GeckoApp
 
         GeckoAppShell.sendEventToGecko(new GeckoEvent(GeckoEvent.ACTIVITY_STOPPING));
         super.onStop();
     }
 
     @Override
     public void onRestart()
     {
-        Log.i(LOG_NAME, "restart");
+        Log.i(LOGTAG, "restart");
         super.onRestart();
     }
 
     @Override
     public void onStart()
     {
         Log.w(LOGTAG, "zerdatime " + new Date().getTime() + " - onStart");
 
-        Log.i(LOG_NAME, "start");
+        Log.i(LOGTAG, "start");
         GeckoAppShell.sendEventToGecko(new GeckoEvent(GeckoEvent.ACTIVITY_START));
         super.onStart();
     }
 
     @Override
     public void onDestroy()
     {
-        Log.i(LOG_NAME, "destroy");
+        Log.i(LOGTAG, "destroy");
 
         // Tell Gecko to shutting down; we'll end up calling System.exit()
         // in onXreExit.
         if (isFinishing())
             GeckoAppShell.sendEventToGecko(new GeckoEvent(GeckoEvent.ACTIVITY_SHUTDOWN));
         
         GeckoAppShell.unregisterGeckoEventListener("DOMContentLoaded", GeckoApp.mAppContext);
         GeckoAppShell.unregisterGeckoEventListener("DOMTitleChanged", GeckoApp.mAppContext);
@@ -1411,25 +1409,25 @@ abstract public class GeckoApp
         mFavicons.close();
 
         super.onDestroy();
     }
 
     @Override
     public void onConfigurationChanged(android.content.res.Configuration newConfig)
     {
-        Log.i(LOG_NAME, "configuration changed");
+        Log.i(LOGTAG, "configuration changed");
         // nothing, just ignore
         super.onConfigurationChanged(newConfig);
     }
 
     @Override
     public void onLowMemory()
     {
-        Log.e(LOG_NAME, "low memory");
+        Log.e(LOGTAG, "low memory");
         if (checkLaunchState(LaunchState.GeckoRunning))
             GeckoAppShell.onLowMemory();
         super.onLowMemory();
     }
 
     abstract public String getPackageName();
     abstract public String getContentProcessName();
 
@@ -1451,33 +1449,33 @@ abstract public class GeckoApp
         try {
             String action = "org.mozilla.gecko.restart";
             Intent intent = new Intent(action);
             intent.setClassName(getPackageName(),
                                 getPackageName() + ".Restarter");
             /* TODO: addEnvToIntent(intent); */
             intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
                             Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
-            Log.i(LOG_NAME, intent.toString());
+            Log.i(LOGTAG, intent.toString());
             GeckoAppShell.killAnyZombies();
             startActivity(intent);
         } catch (Exception e) {
-            Log.i(LOG_NAME, "error doing restart", e);
+            Log.i(LOGTAG, "error doing restart", e);
         }
         finish();
         // Give the restart process time to start before we die
         GeckoAppShell.waitForAnotherGeckoProc();
     }
 
     public void handleNotification(String action, String alertName, String alertCookie) {
         GeckoAppShell.handleNotification(action, alertName, alertCookie);
     }
 
     private void checkAndLaunchUpdate() {
-        Log.i(LOG_NAME, "Checking for an update");
+        Log.i(LOGTAG, "Checking for an update");
 
         int statusCode = 8; // UNEXPECTED_ERROR
         File baseUpdateDir = null;
         if (Build.VERSION.SDK_INT >= 8)
             baseUpdateDir = getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
         else
             baseUpdateDir = new File(Environment.getExternalStorageDirectory().getPath(), "download");
 
@@ -1487,61 +1485,61 @@ abstract public class GeckoApp
         File statusFile = new File(updateDir, "update.status");
 
         if (!statusFile.exists() || !readUpdateStatus(statusFile).equals("pending"))
             return;
 
         if (!updateFile.exists())
             return;
 
-        Log.i(LOG_NAME, "Update is available!");
+        Log.i(LOGTAG, "Update is available!");
 
         // Launch APK
         File updateFileToRun = new File(updateDir, getPackageName() + "-update.apk");
         try {
             if (updateFile.renameTo(updateFileToRun)) {
                 String amCmd = "/system/bin/am start -a android.intent.action.VIEW " +
                                "-n com.android.packageinstaller/.PackageInstallerActivity -d file://" +
                                updateFileToRun.getPath();
-                Log.i(LOG_NAME, amCmd);
+                Log.i(LOGTAG, amCmd);
                 Runtime.getRuntime().exec(amCmd);
                 statusCode = 0; // OK
             } else {
-                Log.i(LOG_NAME, "Cannot rename the update file!");
+                Log.i(LOGTAG, "Cannot rename the update file!");
                 statusCode = 7; // WRITE_ERROR
             }
         } catch (Exception e) {
-            Log.i(LOG_NAME, "error launching installer to update", e);
+            Log.i(LOGTAG, "error launching installer to update", e);
         }
 
         // Update the status file
         String status = statusCode == 0 ? "succeeded\n" : "failed: "+ statusCode + "\n";
 
         OutputStream outStream;
         try {
             byte[] buf = status.getBytes("UTF-8");
             outStream = new FileOutputStream(statusFile);
             outStream.write(buf, 0, buf.length);
             outStream.close();
         } catch (Exception e) {
-            Log.i(LOG_NAME, "error writing status file", e);
+            Log.i(LOGTAG, "error writing status file", e);
         }
 
         if (statusCode == 0)
             System.exit(0);
     }
 
     private String readUpdateStatus(File statusFile) {
         String status = "";
         try {
             BufferedReader reader = new BufferedReader(new FileReader(statusFile));
             status = reader.readLine();
             reader.close();
         } catch (Exception e) {
-            Log.i(LOG_NAME, "error reading update status", e);
+            Log.i(LOGTAG, "error reading update status", e);
         }
         return status;
     }
 
     private SynchronousQueue<String> mFilePickerResult = new SynchronousQueue<String>();
     public String showFilePicker(String aMimeType) {
         Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
         intent.addCategory(Intent.CATEGORY_OPENABLE);
@@ -1549,21 +1547,21 @@ abstract public class GeckoApp
         GeckoApp.this.
             startActivityForResult(
                 Intent.createChooser(intent, getString(R.string.choose_file)),
                 FILE_PICKER_REQUEST);
         String filePickerResult = "";
 
         try {
             while (null == (filePickerResult = mFilePickerResult.poll(1, TimeUnit.MILLISECONDS))) {
-                Log.i(LOG_NAME, "processing events from showFilePicker ");
+                Log.i(LOGTAG, "processing events from showFilePicker ");
                 GeckoAppShell.processNextNativeEvent();
             }
         } catch (InterruptedException e) {
-            Log.i(LOG_NAME, "showing file picker ",  e);
+            Log.i(LOGTAG, "showing file picker ",  e);
         }
 
         return filePickerResult;
     }
 
     @Override
     public boolean onSearchRequested() {
         return showAwesomebar(AwesomeBar.Type.ADD);
@@ -1588,35 +1586,35 @@ abstract public class GeckoApp
                 }
             }
         }
         startActivityForResult(intent, AWESOMEBAR_REQUEST);
         return true;
     }
 
     public boolean doReload() {
-        Log.i(LOG_NAME, "Reload requested");
+        Log.i(LOGTAG, "Reload requested");
         Tab tab = Tabs.getInstance().getSelectedTab();
         if (tab == null)
             return false;
 
         return tab.doReload();
     }
 
     public boolean doForward() {
-        Log.i(LOG_NAME, "Forward requested");
+        Log.i(LOGTAG, "Forward requested");
         Tab tab = Tabs.getInstance().getSelectedTab();
         if (tab == null)
             return false;
 
         return tab.doForward();
     }
 
     public boolean doStop() {
-        Log.i(LOG_NAME, "Stop requested");
+        Log.i(LOGTAG, "Stop requested");
         Tab tab = Tabs.getInstance().getSelectedTab();
         if (tab == null)
             return false;
 
         return tab.doStop();
     }
 
     @Override
@@ -1684,37 +1682,37 @@ abstract public class GeckoApp
                     int len = is.read(buf);
                     while (len != -1) {
                         fos.write(buf, 0, len);
                         len = is.read(buf);
                     }
                     fos.close();
                     filePickerResult =  file.getAbsolutePath();
                 }catch (Exception e) {
-                    Log.e(LOG_NAME, "showing file picker", e);
+                    Log.e(LOGTAG, "showing file picker", e);
                 }
             }
             try {
                 mFilePickerResult.put(filePickerResult);
             } catch (InterruptedException e) {
-                Log.i(LOG_NAME, "error returning file picker result", e);
+                Log.i(LOGTAG, "error returning file picker result", e);
             }
             break;
         case AWESOMEBAR_REQUEST:
             if (data != null) {
                 String url = data.getStringExtra(AwesomeBar.URL_KEY);
                 AwesomeBar.Type type = AwesomeBar.Type.valueOf(data.getStringExtra(AwesomeBar.TYPE_KEY));
                 if (url != null && url.length() > 0) {
                     mBrowserToolbar.setProgressVisibility(true);
                     loadUrl(url, type);
                 }
             }
             break;
         case CAMERA_CAPTURE_REQUEST:
-            Log.i(LOG_NAME, "Returning from CAMERA_CAPTURE_REQUEST: " + resultCode);
+            Log.i(LOGTAG, "Returning from CAMERA_CAPTURE_REQUEST: " + resultCode);
             File file = new File(Environment.getExternalStorageDirectory(), "cameraCapture-" + Integer.toString(kCaptureIndex) + ".jpg");
             kCaptureIndex++;
             GeckoEvent e = new GeckoEvent("cameraCaptureDone", resultCode == Activity.RESULT_OK ?
                                           "{\"ok\": true,  \"path\": \"" + file.getPath() + "\" }" :
                                           "{\"ok\": false, \"path\": \"" + file.getPath() + "\" }");
             GeckoAppShell.sendEventToGecko(e);
             break;
        }
@@ -1726,17 +1724,17 @@ abstract public class GeckoApp
         Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
         intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file));
 
         startActivityForResult(intent, CAMERA_CAPTURE_REQUEST);
     }
 
     public void loadUrl(String url, AwesomeBar.Type type) {
         mBrowserToolbar.setTitle(url);
-        Log.d(LOG_NAME, type.name());
+        Log.d(LOGTAG, type.name());
         if (type == AwesomeBar.Type.ADD) {
             GeckoAppShell.sendEventToGecko(new GeckoEvent("Tab:Add", url));
         } else {
             GeckoAppShell.sendEventToGecko(new GeckoEvent("Tab:Load", url));
         }
     }
 
     public GeckoSoftwareLayerClient getSoftwareLayerClient() { return mSoftwareLayerClient; }
--- a/embedding/android/GeckoAppShell.java
+++ b/embedding/android/GeckoAppShell.java
@@ -78,17 +78,17 @@ import android.net.NetworkInfo;
 import android.graphics.Bitmap;
 import android.graphics.drawable.*;
 
 import org.json.JSONArray;
 import org.json.JSONObject;
 
 public class GeckoAppShell
 {
-    private static final String LOG_FILE_NAME = "GeckoAppShell";
+    private static final String LOGTAG = "GeckoAppShell";
 
     // static members only
     private GeckoAppShell() { }
 
     static private LinkedList<GeckoEvent> gPendingEvents =
         new LinkedList<GeckoEvent>();
 
     static private boolean gRestartScheduled = false;
@@ -202,35 +202,35 @@ public class GeckoAppShell
         try {
             if (sFreeSpace == -1) {
                 File cacheDir = getCacheDir();
                 if (cacheDir != null) {
                     StatFs cacheStats = new StatFs(cacheDir.getPath());
                     sFreeSpace = cacheStats.getFreeBlocks() *
                         cacheStats.getBlockSize();
                 } else {
-                    Log.i(LOG_FILE_NAME, "Unable to get cache dir");
+                    Log.i(LOGTAG, "Unable to get cache dir");
                 }
             }
         } catch (Exception e) {
-            Log.e(LOG_FILE_NAME, "exception while stating cache dir: ", e);
+            Log.e(LOGTAG, "exception while stating cache dir: ", e);
         }
         return sFreeSpace;
     }
 
     static boolean moveFile(File inFile, File outFile)
     {
-        Log.i(LOG_FILE_NAME, "moving " + inFile + " to " + outFile);
+        Log.i(LOGTAG, "moving " + inFile + " to " + outFile);
         if (outFile.isDirectory())
             outFile = new File(outFile, inFile.getName());
         try {
             if (inFile.renameTo(outFile))
                 return true;
         } catch (SecurityException se) {
-            Log.w(LOG_FILE_NAME, "error trying to rename file", se);
+            Log.w(LOGTAG, "error trying to rename file", se);
         }
         try {
             long lastModified = inFile.lastModified();
             outFile.createNewFile();
             // so copy it instead
             FileChannel inChannel = new FileInputStream(inFile).getChannel();
             FileChannel outChannel = new FileOutputStream(outFile).getChannel();
             long size = inChannel.size();
@@ -239,34 +239,34 @@ public class GeckoAppShell
             outChannel.close();
             outFile.setLastModified(lastModified);
 
             if (transferred == size)
                 inFile.delete();
             else
                 return false;
         } catch (Exception e) {
-            Log.e(LOG_FILE_NAME, "exception while moving file: ", e);
+            Log.e(LOGTAG, "exception while moving file: ", e);
             try {
                 outFile.delete();
             } catch (SecurityException se) {
-                Log.w(LOG_FILE_NAME, "error trying to delete file", se);
+                Log.w(LOGTAG, "error trying to delete file", se);
             }
             return false;
         }
         return true;
     }
 
     static boolean moveDir(File from, File to) {
         try {
             to.mkdirs();
             if (from.renameTo(to))
                 return true;
         } catch (SecurityException se) {
-            Log.w(LOG_FILE_NAME, "error trying to rename file", se);
+            Log.w(LOGTAG, "error trying to rename file", se);
         }
         File[] files = from.listFiles();
         boolean retVal = true;
         if (files == null)
             return false;
         try {
             Iterator fileIterator = Arrays.asList(files).iterator();
             while (fileIterator.hasNext()) {
@@ -274,17 +274,17 @@ public class GeckoAppShell
                 File dest = new File(to, file.getName());
                 if (file.isDirectory())
                     retVal = moveDir(file, dest) ? retVal : false;
                 else
                     retVal = moveFile(file, dest) ? retVal : false;
             }
             from.delete();
         } catch(Exception e) {
-            Log.e(LOG_FILE_NAME, "error trying to move file", e);
+            Log.e(LOGTAG, "error trying to move file", e);
         }
         return retVal;
     }
 
     // java-side stuff
     public static void loadGeckoLibs(String apkName) {
         // The package data lib directory isn't placed in ld.so's
         // search path, so we have to manually load libraries that
@@ -323,34 +323,34 @@ public class GeckoAppShell
             File intProf = new File(intHome, "mozilla");
             if (intHome != null && intProf != null && intProf.exists())
                 moveDir(intProf, profileDir);
         }
         try {
             String[] dirs = GeckoApp.mAppContext.getPluginDirectories();
             StringBuffer pluginSearchPath = new StringBuffer();
             for (int i = 0; i < dirs.length; i++) {
-                Log.i("GeckoPlugins", "dir: " + dirs[i]);
+                Log.i(LOGTAG, "dir: " + dirs[i]);
                 pluginSearchPath.append(dirs[i]);
                 pluginSearchPath.append(":");
             }
             GeckoAppShell.putenv("MOZ_PLUGIN_PATH="+pluginSearchPath);
         } catch (Exception ex) {
-            Log.i("GeckoPlugins", "exception getting plugin dirs", ex);
+            Log.i(LOGTAG, "exception getting plugin dirs", ex);
         }
 
         GeckoAppShell.putenv("HOME=" + homeDir);
         GeckoAppShell.putenv("GRE_HOME=" + GeckoApp.sGREDir.getPath());
         Intent i = geckoApp.getIntent();
         String env = i.getStringExtra("env0");
-        Log.i(LOG_FILE_NAME, "env0: "+ env);
+        Log.i(LOGTAG, "env0: "+ env);
         for (int c = 1; env != null; c++) {
             GeckoAppShell.putenv(env);
             env = i.getStringExtra("env" + c);
-            Log.i(LOG_FILE_NAME, "env"+ c +": "+ env);
+            Log.i(LOGTAG, "env"+ c +": "+ env);
         }
 
         File f = geckoApp.getDir("tmp", Context.MODE_WORLD_READABLE |
                                  Context.MODE_WORLD_WRITEABLE );
 
         if (!f.exists())
             f.mkdirs();
 
@@ -375,17 +375,17 @@ public class GeckoAppShell
                 updatesDir  = GeckoApp.mAppContext.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
             } else {
                 updatesDir = downloadDir = new File(Environment.getExternalStorageDirectory().getPath(), "download");
             }
             GeckoAppShell.putenv("DOWNLOADS_DIRECTORY=" + downloadDir.getPath());
             GeckoAppShell.putenv("UPDATES_DIRECTORY="   + updatesDir.getPath());
         }
         catch (Exception e) {
-            Log.i(LOG_FILE_NAME, "No download directory has been found: " + e);
+            Log.i(LOGTAG, "No download directory has been found: " + e);
         }
 
         putLocaleEnv();
 
         boolean extractLibs = GeckoApp.ACTION_DEBUG.equals(i.getAction());
         if (!extractLibs) {
             // remove any previously extracted libs
             File[] files = cacheFile.listFiles();
@@ -413,22 +413,22 @@ public class GeckoAppShell
             GeckoAppShell.putenv("LOCALE_GROUPING=" + (char)df.getGroupingSize());
         }
     }
 
     public static void runGecko(String apkPath, String args, String url) {
         // run gecko -- it will spawn its own thread
         GeckoAppShell.nativeInit();
 
-        Log.i("GeckoAppJava", "post native init");
+        Log.i(LOGTAG, "post native init");
 
         // Tell Gecko where the target byte buffer is for rendering
         GeckoAppShell.setSoftwareLayerClient(GeckoApp.mAppContext.getSoftwareLayerClient());
 
-        Log.i("GeckoAppJava", "setSoftwareLayerClient called");
+        Log.i(LOGTAG, "setSoftwareLayerClient called");
 
         // First argument is the .apk path
         String combinedArgs = apkPath + " -greomni " + apkPath;
         if (args != null)
             combinedArgs += " " + args;
         if (url != null)
             combinedArgs += " -remote " + url;
 
@@ -617,35 +617,35 @@ public class GeckoAppShell
         // mLaunchState can only be Launched at this point
         GeckoApp.mAppContext.setLaunchState(GeckoApp.LaunchState.GeckoRunning);
         sendPendingEventsToGecko();
     }
 
     static void onXreExit() {
         // mLaunchState can only be Launched or GeckoRunning at this point
         GeckoApp.mAppContext.setLaunchState(GeckoApp.LaunchState.GeckoExiting);
-        Log.i("GeckoAppJava", "XRE exited");
+        Log.i(LOGTAG, "XRE exited");
         if (gRestartScheduled) {
             GeckoApp.mAppContext.doRestart();
         } else {
-            Log.i("GeckoAppJava", "we're done, good bye");
+            Log.i(LOGTAG, "we're done, good bye");
             GeckoApp.mAppContext.finish();
         }
 
-        Log.w("GeckoAppShell", "Killing via System.exit()");
+        Log.w(LOGTAG, "Killing via System.exit()");
         System.exit(0);
     }
     static void scheduleRestart() {
-        Log.i("GeckoAppJava", "scheduling restart");
+        Log.i(LOGTAG, "scheduling restart");
         gRestartScheduled = true;
     }
 
     // "Installs" an application by creating a shortcut
     static void createShortcut(String aTitle, String aURI, String aIconData, String aType) {
-        Log.w("GeckoAppJava", "createShortcut for " + aURI + " [" + aTitle + "] > " + aType);
+        Log.w(LOGTAG, "createShortcut for " + aURI + " [" + aTitle + "] > " + aType);
 
         // the intent to be launched by the shortcut
         Intent shortcutIntent = new Intent();
         if (aType.equalsIgnoreCase("webapp")) {
             shortcutIntent.setAction("org.mozilla.gecko.WEBAPP");
             shortcutIntent.putExtra("args", "--webapp=" + aURI);
         } else {
             shortcutIntent.setAction("org.mozilla.gecko.BOOKMARK");
@@ -841,17 +841,17 @@ public class GeckoAppShell
                         context.getSystemService(Context.CLIPBOARD_SERVICE);
                     cm.setText(text);
                 }
             }});
     }
 
     public static void showAlertNotification(String aImageUrl, String aAlertTitle, String aAlertText,
                                              String aAlertCookie, String aAlertName) {
-        Log.i("GeckoAppJava", "GeckoAppShell.showAlertNotification\n" +
+        Log.i(LOGTAG, "GeckoAppShell.showAlertNotification\n" +
             "- image = '" + aImageUrl + "'\n" +
             "- title = '" + aAlertTitle + "'\n" +
             "- text = '" + aAlertText +"'\n" +
             "- cookie = '" + aAlertCookie +"'\n" +
             "- name = '" + aAlertName + "'");
 
         int icon = R.drawable.icon; // Just use the app icon by default
 
@@ -896,50 +896,50 @@ public class GeckoAppShell
             GeckoApp.mAppContext.getPackageName() + ".NotificationHandler");
         clearNotificationIntent.setData(dataUri);
         notification.deleteIntent = PendingIntent.getBroadcast(GeckoApp.mAppContext, 0, clearNotificationIntent, 0);
 
         mAlertNotifications.put(notificationID, notification);
 
         notification.show();
 
-        Log.i("GeckoAppJava", "Created notification ID " + notificationID);
+        Log.i(LOGTAG, "Created notification ID " + notificationID);
     }
 
     public static void alertsProgressListener_OnProgress(String aAlertName, long aProgress, long aProgressMax, String aAlertText) {
-        Log.i("GeckoAppJava", "GeckoAppShell.alertsProgressListener_OnProgress\n" +
+        Log.i(LOGTAG, "GeckoAppShell.alertsProgressListener_OnProgress\n" +
             "- name = '" + aAlertName +"', " +
             "progress = " + aProgress +" / " + aProgressMax + ", text = '" + aAlertText + "'");
 
         int notificationID = aAlertName.hashCode();
         AlertNotification notification = mAlertNotifications.get(notificationID);
         if (notification != null)
             notification.updateProgress(aAlertText, aProgress, aProgressMax);
 
         if (aProgress == aProgressMax) {
             // Hide the notification at 100%
             removeObserver(aAlertName);
             removeNotification(notificationID);
         }
     }
 
     public static void alertsProgressListener_OnCancel(String aAlertName) {
-        Log.i("GeckoAppJava", "GeckoAppShell.alertsProgressListener_OnCancel('" + aAlertName + "')");
+        Log.i(LOGTAG, "GeckoAppShell.alertsProgressListener_OnCancel('" + aAlertName + "')");
 
         removeObserver(aAlertName);
 
         int notificationID = aAlertName.hashCode();
         removeNotification(notificationID);
     }
 
     public static void handleNotification(String aAction, String aAlertName, String aAlertCookie) {
         int notificationID = aAlertName.hashCode();
 
         if (GeckoApp.ACTION_ALERT_CLICK.equals(aAction)) {
-            Log.i("GeckoAppJava", "GeckoAppShell.handleNotification: callObserver(alertclickcallback)");
+            Log.i(LOGTAG, "GeckoAppShell.handleNotification: callObserver(alertclickcallback)");
             callObserver(aAlertName, "alertclickcallback", aAlertCookie);
 
             AlertNotification notification = mAlertNotifications.get(notificationID);
             if (notification != null && notification.isProgressStyle()) {
                 // When clicked, keep the notification, if it displays a progress
                 return;
             }
         }
@@ -1161,17 +1161,17 @@ public class GeckoAppShell
                     boolean keepGoing = visiter.callback(pid);
                     if (keepGoing == false)
                         break;
                 }
             }
             in.close();
         }
         catch (Exception e) {
-            Log.i(LOG_FILE_NAME, "finding procs throws ",  e);
+            Log.i(LOGTAG, "finding procs throws ",  e);
         }
     }
 
     public static void waitForAnotherGeckoProc(){
         int countdown = 40;
         while (!checkForGeckoProcs() &&  --countdown > 0) {
             try {
                 Thread.currentThread().sleep(100);
@@ -1204,17 +1204,17 @@ public class GeckoAppShell
                 bitmap = Bitmap.createScaledBitmap(bitmap, iconSize, iconSize, true);
 
             ByteBuffer buf = ByteBuffer.allocate(iconSize * iconSize * 4);
             bitmap.copyPixelsToBuffer(buf);
 
             return buf.array();
         }
         catch (Exception e) {
-            Log.i(LOG_FILE_NAME, "getIconForExtension error: ",  e);
+            Log.i(LOGTAG, "getIconForExtension error: ",  e);
             return null;
         }
     }
 
     private static Drawable getDrawableForExtension(PackageManager pm, String aExt) {
         Intent intent = new Intent(Intent.ACTION_VIEW);
         MimeTypeMap mtm = MimeTypeMap.getSingleton();
         String mimeType = mtm.getMimeTypeFromExtension(aExt);
@@ -1254,73 +1254,73 @@ public class GeckoAppShell
             (AccessibilityManager) GeckoApp.mAppContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
         return accessibilityManager.isEnabled();
     }
 
     public static void addPluginView(View view,
                                      double x, double y,
                                      double w, double h)
     {
-        Log.i("GeckoAppShell", "addPluginView:" + view + " @ x:" + x + " y:" + y + " w:" + w + " h:" + h ) ;
+        Log.i(LOGTAG, "addPluginView:" + view + " @ x:" + x + " y:" + y + " w:" + w + " h:" + h ) ;
         GeckoApp.mAppContext.addPluginView(view, x, y, w, h);
     }
 
     public static void removePluginView(View view) {
-        Log.i("GeckoAppShell", "remove view:" + view);
+        Log.i(LOGTAG, "remove view:" + view);
         GeckoApp.mAppContext.removePluginView(view);
     }
 
     public static Class<?> loadPluginClass(String className, String libName) {
-        Log.i("GeckoAppShell", "in loadPluginClass... attempting to access className, then libName.....");
-        Log.i("GeckoAppShell", "className: " + className);
-        Log.i("GeckoAppShell", "libName: " + libName);
+        Log.i(LOGTAG, "in loadPluginClass... attempting to access className, then libName.....");
+        Log.i(LOGTAG, "className: " + className);
+        Log.i(LOGTAG, "libName: " + libName);
 
         try {
             String[] split = libName.split("/");
             String packageName = split[split.length - 3];
-            Log.i("GeckoAppShell", "load \"" + className + "\" from \"" + packageName + 
+            Log.i(LOGTAG, "load \"" + className + "\" from \"" + packageName + 
                   "\" for \"" + libName + "\"");
             Context pluginContext = 
                 GeckoApp.mAppContext.createPackageContext(packageName,
                                                           Context.CONTEXT_INCLUDE_CODE |
                                                       Context.CONTEXT_IGNORE_SECURITY);
             ClassLoader pluginCL = pluginContext.getClassLoader();
             return pluginCL.loadClass(className);
         } catch (java.lang.ClassNotFoundException cnfe) {
-            Log.i("GeckoAppShell", "class not found", cnfe);
+            Log.i(LOGTAG, "class not found", cnfe);
         } catch (android.content.pm.PackageManager.NameNotFoundException nnfe) {
-            Log.i("GeckoAppShell", "package not found", nnfe);
+            Log.i(LOGTAG, "package not found", nnfe);
         }
-        Log.e("GeckoAppShell", "couldn't find class");
+        Log.e(LOGTAG, "couldn't find class");
         return null;
     }
 
     static native void executeNextRunnable();
 
     static class GeckoRunnableCallback implements Runnable {
         public void run() {
-            Log.i("GeckoShell", "run GeckoRunnableCallback");
+            Log.i(LOGTAG, "run GeckoRunnableCallback");
             GeckoAppShell.executeNextRunnable();
         }
     }
 
     public static void postToJavaThread(boolean mainThread) {
-        Log.i("GeckoShell", "post to " + (mainThread ? "main " : "") + "java thread");
+        Log.i(LOGTAG, "post to " + (mainThread ? "main " : "") + "java thread");
         getMainHandler().post(new GeckoRunnableCallback());
     }
     
     public static android.hardware.Camera sCamera = null;
     
     static native void cameraCallbackBridge(byte[] data);
 
     static int kPreferedFps = 25;
     static byte[] sCameraBuffer = null;
 
     static int[] initCamera(String aContentType, int aCamera, int aWidth, int aHeight) {
-        Log.i("GeckoAppJava", "initCamera(" + aContentType + ", " + aWidth + "x" + aHeight + ") on thread " + Thread.currentThread().getId());
+        Log.i(LOGTAG, "initCamera(" + aContentType + ", " + aWidth + "x" + aHeight + ") on thread " + Thread.currentThread().getId());
 
         getMainHandler().post(new Runnable() {
                 public void run() {
                     try {
                         GeckoApp.mAppContext.enableCameraView();
                     } catch (Exception e) {}
                 }
             });
@@ -1373,50 +1373,50 @@ public class GeckoAppShell
                     params.setPreviewSize(size.width, size.height);
                     bufferSize = size.width * size.height;
                 }
             }
 
             try {
                 sCamera.setPreviewDisplay(GeckoApp.cameraView.getHolder());
             } catch(IOException e) {
-                Log.e("GeckoAppJava", "Error setPreviewDisplay:", e);
+                Log.e(LOGTAG, "Error setPreviewDisplay:", e);
             } catch(RuntimeException e) {
-                Log.e("GeckoAppJava", "Error setPreviewDisplay:", e);
+                Log.e(LOGTAG, "Error setPreviewDisplay:", e);
             }
 
             sCamera.setParameters(params);
             sCameraBuffer = new byte[(bufferSize * 12) / 8];
             sCamera.addCallbackBuffer(sCameraBuffer);
             sCamera.setPreviewCallbackWithBuffer(new android.hardware.Camera.PreviewCallback() {
                 public void onPreviewFrame(byte[] data, android.hardware.Camera camera) {
                     cameraCallbackBridge(data);
                     if (sCamera != null)
                         sCamera.addCallbackBuffer(sCameraBuffer);
                 }
             });
             sCamera.startPreview();
             params = sCamera.getParameters();
-            Log.i("GeckoAppJava", "Camera: " + params.getPreviewSize().width + "x" + params.getPreviewSize().height +
+            Log.i(LOGTAG, "Camera: " + params.getPreviewSize().width + "x" + params.getPreviewSize().height +
                   " @ " + params.getPreviewFrameRate() + "fps. format is " + params.getPreviewFormat());
             result[0] = 1;
             result[1] = params.getPreviewSize().width;
             result[2] = params.getPreviewSize().height;
             result[3] = params.getPreviewFrameRate();
 
-            Log.i("GeckoAppJava", "Camera preview started");
+            Log.i(LOGTAG, "Camera preview started");
         } catch(RuntimeException e) {
-            Log.e("GeckoAppJava", "initCamera RuntimeException : ", e);
+            Log.e(LOGTAG, "initCamera RuntimeException : ", e);
             result[0] = result[1] = result[2] = result[3] = 0;
         }
         return result;
     }
 
     static synchronized void closeCamera() {
-        Log.i("GeckoAppJava", "closeCamera() on thread " + Thread.currentThread().getId());
+        Log.i(LOGTAG, "closeCamera() on thread " + Thread.currentThread().getId());
         getMainHandler().post(new Runnable() {
                 public void run() {
                     try {
                         GeckoApp.mAppContext.disableCameraView();
                     } catch (Exception e) {}
                 }
             });
         if (sCamera != null) {
@@ -1442,24 +1442,24 @@ public class GeckoAppShell
 
     static SynchronousQueue<Date> sTracerQueue = new SynchronousQueue<Date>();
     public static void fireAndWaitForTracerEvent() {
         getMainHandler().post(new Runnable() { 
                 public void run() {
                     try {
                         sTracerQueue.put(new Date());
                     } catch(InterruptedException ie) {
-                        Log.w("GeckoAppShell", "exception firing tracer", ie);
+                        Log.w(LOGTAG, "exception firing tracer", ie);
                     }
                 }
         });
         try {
             sTracerQueue.take();
         } catch(InterruptedException ie) {
-            Log.w("GeckoAppShell", "exception firing tracer", ie);
+            Log.w(LOGTAG, "exception firing tracer", ie);
         }
     }
 
     public static void unregisterGeckoEventListener(String event, GeckoEventListener listener) {
         if (mEventListeners == null)
             return;
 
         if (!mEventListeners.containsKey(event))
@@ -1494,17 +1494,17 @@ public class GeckoAppShell
                 });
 
                 String promptServiceResult = "";
                 try {
                     while (null == (promptServiceResult = sPromptQueue.poll(1, TimeUnit.MILLISECONDS))) {
                         processNextNativeEvent();
                     }
                 } catch (InterruptedException e) {
-                    Log.i(LOG_FILE_NAME, "showing prompt ",  e);
+                    Log.i(LOGTAG, "showing prompt ",  e);
                 }
                 return promptServiceResult;
             }
             
             if (mEventListeners == null)
                 return "";
 
             if (!mEventListeners.containsKey(type))
@@ -1512,17 +1512,17 @@ public class GeckoAppShell
             
             ArrayList<GeckoEventListener> listeners = mEventListeners.get(type);
             Iterator items = listeners.iterator();
             while (items.hasNext()) {
                 ((GeckoEventListener) items.next()).handleMessage(type, geckoObject);
             }
 
         } catch (Exception e) {
-            Log.i("GeckoShell", "handleGeckoMessage throws " + e);
+            Log.i(LOGTAG, "handleGeckoMessage throws " + e);
         }
 
         return "";
     }
 
     public static void disableBatteryNotifications() {
         GeckoBatteryManager.disableNotifications();
     }
--- a/embedding/android/GeckoBatteryManager.java
+++ b/embedding/android/GeckoBatteryManager.java
@@ -46,43 +46,45 @@ import android.content.BroadcastReceiver
 import android.content.Context;
 import android.content.Intent;
 
 import android.os.BatteryManager;
 
 public class GeckoBatteryManager
   extends BroadcastReceiver
 {
+    private static final String LOGTAG = "GeckoBatteryManager";
+
   // Those constants should be keep in sync with the ones in:
   // dom/battery/Constants.h
   private final static double  kDefaultLevel         = 1.0;
   private final static boolean kDefaultCharging      = true;
   private final static double  kUnknownRemainingTime = -1.0;
 
   private static Date    sLastLevelChange            = new Date(0);
   private static boolean sNotificationsEnabled       = false;
   private static double  sLevel                      = kDefaultLevel;
   private static boolean sCharging                   = kDefaultCharging;
   private static double  sRemainingTime              = kUnknownRemainingTime;;
 
   @Override
   public void onReceive(Context context, Intent intent) {
     if (!intent.getAction().equals(Intent.ACTION_BATTERY_CHANGED)) {
-      Log.e("GeckoBatteryManager", "Got an unexpected intent!");
+      Log.e(LOGTAG, "Got an unexpected intent!");
       return;
     }
 
     boolean previousCharging = isCharging();
     double previousLevel = getLevel();
 
     if (intent.getBooleanExtra(BatteryManager.EXTRA_PRESENT, false)) {
       int plugged = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
       if (plugged == -1) {
         sCharging = kDefaultCharging;
-        Log.e("GeckoBatteryManager", "Failed to get the plugged status!");
+        Log.e(LOGTAG, "Failed to get the plugged status!");
       } else {
         // Likely, if plugged > 0, it's likely plugged and charging but the doc
         // isn't clear about that.
         sCharging = plugged != 0;
       }
 
       if (sCharging != previousCharging) {
         sRemainingTime = kUnknownRemainingTime;
@@ -90,41 +92,41 @@ public class GeckoBatteryManager
         // it's the best way to show a not too wrong value.
         sLastLevelChange = new Date(0);
       }
 
       // We need two doubles because sLevel is a double.
       double current =  (double)intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
       double max = (double)intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
       if (current == -1 || max == -1) {
-        Log.e("GeckoBatteryManager", "Failed to get battery level!");
+        Log.e(LOGTAG, "Failed to get battery level!");
         sLevel = kDefaultLevel;
       } else {
         sLevel = current / max;
       }
 
       if (sLevel == 1.0 && sCharging) {
         sRemainingTime = 0.0;
       } else if (sLevel != previousLevel) {
         // Estimate remaining time.
         if (sLastLevelChange.getTime() != 0) {
           Date currentTime = new Date();
           long dt = (currentTime.getTime() - sLastLevelChange.getTime()) / 1000;
           double dLevel = sLevel - previousLevel;
 
           if (sCharging) {
             if (dLevel < 0) {
-              Log.w("GeckoBatteryManager", "When charging, level should increase!");
+              Log.w(LOGTAG, "When charging, level should increase!");
               sRemainingTime = kUnknownRemainingTime;
             } else {
               sRemainingTime = Math.round(dt / dLevel * (1.0 - sLevel));
             }
           } else {
             if (dLevel > 0) {
-              Log.w("GeckoBatteryManager", "When discharging, level should decrease!");
+              Log.w(LOGTAG, "When discharging, level should decrease!");
               sRemainingTime = kUnknownRemainingTime;
             } else {
               sRemainingTime = Math.round(dt / -dLevel * sLevel);
             }
           }
 
           sLastLevelChange = currentTime;
         } else {
--- a/embedding/android/GeckoEvent.java
+++ b/embedding/android/GeckoEvent.java
@@ -50,16 +50,18 @@ import android.util.FloatMath;
 import android.util.Log;
 
 /* We're not allowed to hold on to most events given to us
  * so we save the parts of the events we want to use in GeckoEvent.
  * Fields have different meanings depending on the event type.
  */
 
 public class GeckoEvent {
+    private static final String LOGTAG = "GeckoEvent";
+
     public static final int INVALID = -1;
     public static final int NATIVE_POKE = 0;
     public static final int KEY_EVENT = 1;
     public static final int MOTION_EVENT = 2;
     public static final int ORIENTATION_EVENT = 3;
     public static final int ACCELERATION_EVENT = 4;
     public static final int LOCATION_EVENT = 5;
     public static final int IME_EVENT = 6;
@@ -152,17 +154,17 @@ public class GeckoEvent {
             mY = s.values[1] / SensorManager.GRAVITY_EARTH;
             mZ = s.values[2] / SensorManager.GRAVITY_EARTH;
         }
         else {
             mType = ORIENTATION_EVENT;
             mAlpha = -s.values[0];
             mBeta = -s.values[1];
             mGamma = -s.values[2];
-            Log.i("GeckoEvent", "SensorEvent type = " + s.sensor.getType() + " " + s.sensor.getName() + " " + mAlpha + " " + mBeta + " " + mGamma );
+            Log.i(LOGTAG, "SensorEvent type = " + s.sensor.getType() + " " + s.sensor.getName() + " " + mAlpha + " " + mBeta + " " + mGamma );
         }
     }
 
     public GeckoEvent(Location l, Address a) {
         mType = LOCATION_EVENT;
         mLocation = l;
         mAddress  = a;
     }
--- a/embedding/android/GeckoInputConnection.java
+++ b/embedding/android/GeckoInputConnection.java
@@ -60,16 +60,18 @@ import android.text.method.KeyListener;
 
 import android.util.*;
 
 
 public class GeckoInputConnection
     extends BaseInputConnection
     implements TextWatcher, InputConnectionHandler
 {
+    private static final String LOGTAG = "GeckoInputConnection";
+
     private class ChangeNotification {
         public String mText;
         public int mStart;
         public int mEnd;
         public int mNewEnd;
 
         ChangeNotification(String text, int start, int oldEnd, int newEnd) {
             mText = text;
@@ -94,41 +96,41 @@ public class GeckoInputConnection
         initEditable("");
         mIMEState = IME_STATE_DISABLED;
         mIMETypeHint = "";
         mIMEActionHint = "";
     }
 
     @Override
     public boolean beginBatchEdit() {
-        Log.d("GeckoAppJava", "IME: beginBatchEdit");
+        Log.d(LOGTAG, "IME: beginBatchEdit");
         mBatchMode = true;
         return true;
     }
 
     @Override
     public boolean commitCompletion(CompletionInfo text) {
-        Log.d("GeckoAppJava", "IME: commitCompletion");
+        Log.d(LOGTAG, "IME: commitCompletion");
 
         return commitText(text.getText(), 1);
     }
 
     @Override
     public boolean commitText(CharSequence text, int newCursorPosition) {
-        Log.d("GeckoAppJava", "IME: commitText");
+        Log.d(LOGTAG, "IME: commitText");
 
         setComposingText(text, newCursorPosition);
         finishComposingText();
 
         return true;
     }
 
     @Override
     public boolean deleteSurroundingText(int leftLength, int rightLength) {
-        Log.d("GeckoAppJava", "IME: deleteSurroundingText");
+        Log.d(LOGTAG, "IME: deleteSurroundingText");
         if (leftLength == 0 && rightLength == 0)
             return true;
 
         /* deleteSurroundingText is supposed to ignore the composing text,
             so we cancel any pending composition, delete the text, and then
             restart the composition */
 
         if (mComposing) {
@@ -141,17 +143,17 @@ public class GeckoInputConnection
 
         // Select text to be deleted
         int delStart, delLen;
         GeckoAppShell.sendEventToGecko(
             new GeckoEvent(GeckoEvent.IME_GET_SELECTION, 0, 0));
         try {
             mQueryResult.take();
         } catch (InterruptedException e) {
-            Log.e("GeckoAppJava", "IME: deleteSurroundingText interrupted", e);
+            Log.e(LOGTAG, "IME: deleteSurroundingText interrupted", e);
             return false;
         }
         delStart = mSelectionStart > leftLength ?
                     mSelectionStart - leftLength : 0;
         delLen = mSelectionStart + rightLength - delStart;
         GeckoAppShell.sendEventToGecko(
             new GeckoEvent(GeckoEvent.IME_SET_SELECTION, delStart, delLen));
 
@@ -177,17 +179,17 @@ public class GeckoInputConnection
         // They will be re-enabled on the next setComposingText
         disableChangeNotifications();
 
         return true;
     }
 
     @Override
     public boolean endBatchEdit() {
-        Log.d("GeckoAppJava", "IME: endBatchEdit");
+        Log.d(LOGTAG, "IME: endBatchEdit");
 
         mBatchMode = false;
 
         if (!mBatchChanges.isEmpty()) {
             InputMethodManager imm = (InputMethodManager)
                 GeckoApp.mAppContext.getSystemService(Context.INPUT_METHOD_SERVICE);
             if (imm != null) {
                 for (ChangeNotification n : mBatchChanges) {
@@ -199,17 +201,17 @@ public class GeckoInputConnection
             }
             mBatchChanges.clear();
         }
         return true;
     }
 
     @Override
     public boolean finishComposingText() {
-        Log.d("GeckoAppJava", "IME: finishComposingText");
+        Log.d(LOGTAG, "IME: finishComposingText");
 
         if (mComposing) {
             // Set style to none
             GeckoAppShell.sendEventToGecko(
                 new GeckoEvent(0, mComposingText.length(),
                                GeckoEvent.IME_RANGE_RAWINPUT, 0, 0, 0,
                                mComposingText));
             GeckoAppShell.sendEventToGecko(
@@ -224,42 +226,42 @@ public class GeckoInputConnection
                                    mCompositionStart + mCompositionSelStart, 0));
             }
         }
         return true;
     }
 
     @Override
     public int getCursorCapsMode(int reqModes) {
-        Log.d("GeckoAppJava", "IME: getCursorCapsMode");
+        Log.d(LOGTAG, "IME: getCursorCapsMode");
 
         return 0;
     }
 
     @Override
     public Editable getEditable() {
-        Log.w("GeckoAppJava", "IME: getEditable called from " +
+        Log.w(LOGTAG, "IME: getEditable called from " +
             Thread.currentThread().getStackTrace()[0].toString());
 
         return null;
     }
 
     @Override
     public boolean performContextMenuAction(int id) {
-        Log.d("GeckoAppJava", "IME: performContextMenuAction");
+        Log.d(LOGTAG, "IME: performContextMenuAction");
 
         // First we need to ask Gecko to tell us the full contents of the
         // text field we're about to operate on.
         String text;
         GeckoAppShell.sendEventToGecko(
             new GeckoEvent(GeckoEvent.IME_GET_TEXT, 0, Integer.MAX_VALUE));
         try {
             text = mQueryResult.take();
         } catch (InterruptedException e) {
-            Log.e("GeckoAppJava", "IME: performContextMenuAction interrupted", e);
+            Log.e(LOGTAG, "IME: performContextMenuAction interrupted", e);
             return false;
         }
 
         switch (id) {
             case R.id.selectAll:
                 setSelection(0, text.length());
                 break;
             case R.id.cut:
@@ -279,17 +281,17 @@ public class GeckoInputConnection
                 // If there is no selection set, we must be doing "Copy All",
                 // otherwise, we need to get the selection from Gecko
                 if (mSelectionLength > 0) {
                     GeckoAppShell.sendEventToGecko(
                         new GeckoEvent(GeckoEvent.IME_GET_SELECTION, 0, 0));
                     try {
                         text = mQueryResult.take();
                     } catch (InterruptedException e) {
-                        Log.e("GeckoAppJava", "IME: performContextMenuAction interrupted", e);
+                        Log.e(LOGTAG, "IME: performContextMenuAction interrupted", e);
                         return false;
                     }
                 }
                 GeckoAppShell.setClipboardText(text);
                 break;
         }
         return true;
     }
@@ -299,29 +301,29 @@ public class GeckoInputConnection
         if (req == null)
             return null;
 
         // Bail out here if gecko isn't running, otherwise we deadlock
         // below when waiting for the reply to IME_GET_SELECTION.
         if (!GeckoApp.checkLaunchState(GeckoApp.LaunchState.GeckoRunning))
             return null;
 
-        Log.d("GeckoAppJava", "IME: getExtractedText");
+        Log.d(LOGTAG, "IME: getExtractedText");
 
         ExtractedText extract = new ExtractedText();
         extract.flags = 0;
         extract.partialStartOffset = -1;
         extract.partialEndOffset = -1;
 
         GeckoAppShell.sendEventToGecko(
             new GeckoEvent(GeckoEvent.IME_GET_SELECTION, 0, 0));
         try {
             mQueryResult.take();
         } catch (InterruptedException e) {
-            Log.e("GeckoAppJava", "IME: getExtractedText interrupted", e);
+            Log.e(LOGTAG, "IME: getExtractedText interrupted", e);
             return null;
         }
         extract.selectionStart = mSelectionStart;
         extract.selectionEnd = mSelectionStart + mSelectionLength;
 
         // bug 617298 - IME_GET_TEXT sometimes gives the wrong result due to
         // a stale cache. Use a set of three workarounds:
         // 1. Sleep for 20 milliseconds and hope the child updates us with the new text.
@@ -344,31 +346,31 @@ public class GeckoInputConnection
             extract.selectionStart = Math.min(extract.selectionStart, extract.text.length());
             extract.selectionEnd = Math.min(extract.selectionEnd, extract.text.length());
 
             if ((flags & GET_EXTRACTED_TEXT_MONITOR) != 0)
                 mUpdateRequest = req;
             return extract;
 
         } catch (InterruptedException e) {
-            Log.e("GeckoAppJava", "IME: getExtractedText interrupted", e);
+            Log.e(LOGTAG, "IME: getExtractedText interrupted", e);
             return null;
         }
     }
 
     @Override
     public CharSequence getTextAfterCursor(int length, int flags) {
-        Log.d("GeckoAppJava", "IME: getTextAfterCursor");
+        Log.d(LOGTAG, "IME: getTextAfterCursor");
 
         GeckoAppShell.sendEventToGecko(
             new GeckoEvent(GeckoEvent.IME_GET_SELECTION, 0, 0));
         try {
             mQueryResult.take();
         } catch (InterruptedException e) {
-            Log.e("GeckoAppJava", "IME: getTextBefore/AfterCursor interrupted", e);
+            Log.e(LOGTAG, "IME: getTextBefore/AfterCursor interrupted", e);
             return null;
         }
 
         /* Compatible with both positive and negative length
             (no need for separate code for getTextBeforeCursor) */
         int textStart = mSelectionStart;
         int textLength = length;
 
@@ -381,45 +383,45 @@ public class GeckoInputConnection
           }
         }
 
         GeckoAppShell.sendEventToGecko(
             new GeckoEvent(GeckoEvent.IME_GET_TEXT, textStart, textLength));
         try {
             return mQueryResult.take();
         } catch (InterruptedException e) {
-            Log.e("GeckoAppJava", "IME: getTextBefore/AfterCursor: Interrupted!", e);
+            Log.e(LOGTAG, "IME: getTextBefore/AfterCursor: Interrupted!", e);
             return null;
         }
     }
 
     @Override
     public CharSequence getTextBeforeCursor(int length, int flags) {
-        Log.d("GeckoAppJava", "IME: getTextBeforeCursor");
+        Log.d(LOGTAG, "IME: getTextBeforeCursor");
 
         return getTextAfterCursor(-length, flags);
     }
 
     @Override
     public boolean setComposingText(CharSequence text, int newCursorPosition) {
-        Log.d("GeckoAppJava", "IME: setComposingText");
+        Log.d(LOGTAG, "IME: setComposingText");
 
         enableChangeNotifications();
 
         // Set new composing text
         mComposingText = text != null ? text.toString() : "";
 
         if (!mComposing) {
             // Get current selection
             GeckoAppShell.sendEventToGecko(
                 new GeckoEvent(GeckoEvent.IME_GET_SELECTION, 0, 0));
             try {
                 mQueryResult.take();
             } catch (InterruptedException e) {
-                Log.e("GeckoAppJava", "IME: setComposingText interrupted", e);
+                Log.e(LOGTAG, "IME: setComposingText interrupted", e);
                 return false;
             }
 
             if (mComposingText.length() == 0) {
                 // Empty composing text is usually sent by IME to delete the selection (for example, ezKeyboard)
                 if (mSelectionLength > 0)
                     GeckoAppShell.sendEventToGecko(new GeckoEvent(GeckoEvent.IME_DELETE_TEXT, 0, 0));
 
@@ -529,17 +531,17 @@ public class GeckoInputConnection
                            GeckoEvent.IME_RANGE_CARETPOSITION, 0, 0, 0,
                            mComposingText));
 
         return true;
     }
 
     @Override
     public boolean setComposingRegion(int start, int end) {
-        Log.d("GeckoAppJava", "IME: setComposingRegion(start=" + start + ", end=" + end + ")");
+        Log.d(LOGTAG, "IME: setComposingRegion(start=" + start + ", end=" + end + ")");
         if (start < 0 || end < start)
             return true;
 
         CharSequence text = null;
         if (start == mCompositionStart && end - start == mComposingText.length()) {
             // Use mComposingText to avoid extra call to Gecko
             text = mComposingText;
         }
@@ -547,33 +549,33 @@ public class GeckoInputConnection
         finishComposingText();
 
         if (text == null && start < end) {
             GeckoAppShell.sendEventToGecko(
                 new GeckoEvent(GeckoEvent.IME_GET_TEXT, start, end - start));
             try {
                 text = mQueryResult.take();
             } catch (InterruptedException e) {
-                Log.e("GeckoAppJava", "IME: setComposingRegion interrupted", e);
+                Log.e(LOGTAG, "IME: setComposingRegion interrupted", e);
                 return false;
             }
         }
 
         GeckoAppShell.sendEventToGecko(
             new GeckoEvent(GeckoEvent.IME_SET_SELECTION, start, end - start));
 
         // Call setComposingText with the same text to start composition and let Gecko know about new composing region
         setComposingText(text, 1);
 
         return true;
     }
 
     @Override
     public boolean setSelection(int start, int end) {
-        Log.d("GeckoAppJava", "IME: setSelection");
+        Log.d(LOGTAG, "IME: setSelection");
 
         if (mComposing) {
             /* Translate to fake selection positions */
             start -= mCompositionStart;
             end -= mCompositionStart;
 
             if (start < 0)
                 start = 0;
@@ -611,17 +613,17 @@ public class GeckoInputConnection
         }
 
         commitText(null, 1);
         return true;
     }
 
     public void notifyTextChange(InputMethodManager imm, String text,
                                  int start, int oldEnd, int newEnd) {
-        Log.d("GeckoAppShell", String.format("IME: notifyTextChange: text=%s s=%d ne=%d oe=%d",
+        Log.d(LOGTAG, String.format("IME: notifyTextChange: text=%s s=%d ne=%d oe=%d",
                                               text, start, newEnd, oldEnd));
         if (!mChangeNotificationsEnabled)
             return;
 
         if (mBatchMode) {
             mBatchChanges.add(new ChangeNotification(text, start, oldEnd, newEnd));
             return;
         }
@@ -652,17 +654,17 @@ public class GeckoInputConnection
         mUpdateExtract.text = text.substring(0, newEnd);
         mUpdateExtract.startOffset = 0;
 
         imm.updateExtractedText(v, mUpdateRequest.token, mUpdateExtract);
     }
 
     public void notifySelectionChange(InputMethodManager imm,
                                       int start, int end) {
-        Log.d("GeckoAppJava", String.format("IME: notifySelectionChange: s=%d e=%d", start, end));
+        Log.d(LOGTAG, String.format("IME: notifySelectionChange: s=%d e=%d", start, end));
 
         if (!mChangeNotificationsEnabled)
             return;
 
         if (mBatchMode) {
             mBatchChanges.add(new ChangeNotification(start, end));
             return;
         }
@@ -695,17 +697,17 @@ public class GeckoInputConnection
         mNumPendingChanges = 0;
         mBatchMode = false;
         mBatchChanges.clear();
     }
 
     // TextWatcher
     public void onTextChanged(CharSequence s, int start, int before, int count)
     {
-         Log.d("GeckoAppShell", String.format("IME: onTextChanged: t=%s s=%d b=%d l=%d",
+         Log.d(LOGTAG, String.format("IME: onTextChanged: t=%s s=%d b=%d l=%d",
                                               s, start, before, count));
 
         mNumPendingChanges++;
         GeckoAppShell.sendEventToGecko(
             new GeckoEvent(GeckoEvent.IME_SET_SELECTION, start, before));
 
         if (count == 0) {
             GeckoAppShell.sendEventToGecko(
@@ -746,17 +748,17 @@ public class GeckoInputConnection
 
     private void enableChangeNotifications() {
         mChangeNotificationsEnabled = true;
     }
 
 
     public InputConnection onCreateInputConnection(EditorInfo outAttrs)
     {
-        Log.d("GeckoAppJava", "IME: handleCreateInputConnection called");
+        Log.d(LOGTAG, "IME: handleCreateInputConnection called");
 
         outAttrs.inputType = InputType.TYPE_CLASS_TEXT;
         outAttrs.imeOptions = EditorInfo.IME_ACTION_NONE;
         outAttrs.actionLabel = null;
         mKeyListener = TextKeyListener.getInstance();
 
         if (mIMEState == IME_STATE_PASSWORD)
             outAttrs.inputType |= InputType.TYPE_TEXT_VARIATION_PASSWORD;
@@ -908,27 +910,27 @@ public class GeckoInputConnection
         return false;
     }
 
 
     public void notifyIME(int type, int state) {
 
         View v = GeckoApp.mAppContext.getLayerController().getView();
 
-        Log.d("GeckoAppJava", "notifyIME");
+        Log.d(LOGTAG, "notifyIME");
 
         if (v == null)
             return;
 
-        Log.d("GeckoAppJava", "notifyIME v!= null");
+        Log.d(LOGTAG, "notifyIME v!= null");
 
         switch (type) {
         case NOTIFY_IME_RESETINPUTSTATE:
 
-        Log.d("GeckoAppJava", "notifyIME = reset");
+        Log.d(LOGTAG, "notifyIME = reset");
             // Composition event is already fired from widget.
             // So reset IME flags.
             reset();
 
             // Don't use IMEStateUpdater for reset.
             // Because IME may not work showSoftInput()
             // after calling restartInput() immediately.
             // So we have to call showSoftInput() delay.
@@ -940,22 +942,22 @@ public class GeckoInputConnection
                 imm.restartInput(v);
             }
 
             // keep current enabled state
             IMEStateUpdater.enableIME();
             break;
 
         case NOTIFY_IME_CANCELCOMPOSITION:
-        Log.d("GeckoAppJava", "notifyIME = cancel");
+        Log.d(LOGTAG, "notifyIME = cancel");
             IMEStateUpdater.resetIME();
             break;
 
         case NOTIFY_IME_FOCUSCHANGE:
-        Log.d("GeckoAppJava", "notifyIME = focus");
+        Log.d(LOGTAG, "notifyIME = focus");
             IMEStateUpdater.resetIME();
             break;
         }
     }
 
     public void notifyIMEEnabled(int state, String typeHint,
                                         String actionHint, boolean landscapeFS)
     {
@@ -979,17 +981,17 @@ public class GeckoInputConnection
 
         if (v == null)
             return;
 
         InputMethodManager imm = (InputMethodManager) v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
         if (imm == null)
             return;
 
-        Log.d("GeckoAppJava", String.format("IME: notifyIMEChange: t=%s s=%d ne=%d oe=%d",
+        Log.d(LOGTAG, String.format("IME: notifyIMEChange: t=%s s=%d ne=%d oe=%d",
                                             text, start, newEnd, end));
 
         if (newEnd < 0)
             notifySelectionChange(imm, start, end);
         else
             notifyTextChange(imm, text, start, end, newEnd);
     }
 
@@ -1028,23 +1030,23 @@ public class GeckoInputConnection
             getInstance().mEnable = true;
         }
 
         static public synchronized void resetIME() {
             getInstance().mReset = true;
         }
 
         public void run() {
-            Log.d("GeckoAppJava", "IME: run()");
+            Log.d(LOGTAG, "IME: run()");
             synchronized(IMEStateUpdater.class) {
                 instance = null;
             }
 
             View v = GeckoApp.mAppContext.getLayerController().getView();
-            Log.d("GeckoAppJava", "IME: v="+v);
+            Log.d(LOGTAG, "IME: v="+v);
 
             InputMethodManager imm = (InputMethodManager) v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
             if (imm == null)
                 return;
 
             if (mReset)
                 imm.restartInput(v);
 
--- a/embedding/android/GeckoPreferences.java
+++ b/embedding/android/GeckoPreferences.java
@@ -48,17 +48,18 @@ import android.util.Log;
 import android.view.View;
 import android.view.ViewGroup;
 import org.json.*;
 
 public class GeckoPreferences
     extends PreferenceActivity
     implements OnPreferenceChangeListener
 {
-    private static final String LOG_FILE_NAME = "GeckoPreferences";
+    private static final String LOGTAG = "GeckoPreferences";
+
     private static Context sContext;
     private static JSONArray sJSONPrefs = null;
     private ArrayList<String> mPreferencesList = new ArrayList<String>();
     private PreferenceScreen mPreferenceScreen;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -152,17 +153,17 @@ public class GeckoPreferences
                     GeckoAppShell.getMainHandler().post(new Runnable() {
                         public void run() {
                             ((ListPreference)pref).setValue(value);
                         }
                     });
                 }
             }
         } catch (JSONException e) {
-            Log.e(LOG_FILE_NAME, "Problem parsing preferences response: ", e);
+            Log.e(LOGTAG, "Problem parsing preferences response: ", e);
         }
     }
 
     public static void setPreference(String pref, Object value) {
         // update the in-memory preferences cache
         JSONObject jsonPref = null;
         try {
             for (int i = 0; i < sJSONPrefs.length(); i++) {
@@ -173,22 +174,22 @@ public class GeckoPreferences
                     else if (value instanceof Integer)
                         jsonPref.put("value", ((Integer)value).intValue());
                     else
                         jsonPref.put("value", String.valueOf(value));
                     break;
                 }
             }
         } catch (JSONException e) {
-            Log.e(LOG_FILE_NAME, "JSON exception: ", e);
+            Log.e(LOGTAG, "JSON exception: ", e);
             return;
         }
 
         if (jsonPref == null) {
-            Log.e(LOG_FILE_NAME, "invalid preference given to setPreference()");
+            Log.e(LOGTAG, "invalid preference given to setPreference()");
             return;
         }
 
         // send the Preferences:Set message to Gecko
         GeckoEvent event = new GeckoEvent("Preferences:Set", jsonPref.toString());
         GeckoAppShell.sendEventToGecko(event);
     }
 }
--- a/embedding/android/GeckoThread.java
+++ b/embedding/android/GeckoThread.java
@@ -46,17 +46,16 @@ import android.widget.AbsoluteLayout;
 import java.io.File;
 import java.io.FilenameFilter;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.util.Date;
 import java.util.Locale;
 
 public class GeckoThread extends Thread {
-
     private static final String LOGTAG = "GeckoThread";
 
     Intent mIntent;
 
     GeckoThread (Intent intent) {
         mIntent = intent;
     }
 
--- a/embedding/android/GlobalHistory.java
+++ b/embedding/android/GlobalHistory.java
@@ -45,44 +45,45 @@ import java.lang.ref.SoftReference;
 
 import android.content.ContentValues;
 import android.database.Cursor;
 import android.os.Handler;
 import android.provider.Browser;
 import android.util.Log;
 
 class GlobalHistory {
+    private static final String LOGTAG = "GeckoGlobalHistory";
+
     private static GlobalHistory sInstance = new GlobalHistory();
 
     static GlobalHistory getInstance() {
         return sInstance;
     }
 
     // this is the delay between receiving a URI check request and processing it.
     // this allows batching together multiple requests and processing them together,
     // which is more efficient.
     private static final long BATCHING_DELAY_MS = 100;
-    private static final String LOG_NAME = "GlobalHistory";
 
     private final Handler mHandler;                     // a background thread on which we can process requests
     private final Queue<String> mPendingUris;           // URIs that need to be checked
     private SoftReference<Set<String>> mVisitedCache;   // cache of the visited URI list
     private final Runnable mNotifierRunnable;           // off-thread runnable used to check URIs
     private boolean mProcessing; // = false             // whether or not the runnable is queued/working
 
     private GlobalHistory() {
         mHandler = GeckoAppShell.getHandler();
         mPendingUris = new LinkedList<String>();
         mVisitedCache = new SoftReference<Set<String>>(null);
         mNotifierRunnable = new Runnable() {
             public void run() {
                 Set<String> visitedSet = mVisitedCache.get();
                 if (visitedSet == null) {
                     // the cache was wiped away, repopulate it
-                    Log.w(LOG_NAME, "Rebuilding visited link set...");
+                    Log.w(LOGTAG, "Rebuilding visited link set...");
                     visitedSet = new HashSet<String>();
                     Cursor c = GeckoApp.mAppContext.getContentResolver().query(Browser.BOOKMARKS_URI,
                                     new String[] { Browser.BookmarkColumns.URL },
                                     Browser.BookmarkColumns.BOOKMARK + "=0 AND " +
                                     Browser.BookmarkColumns.VISITS + ">0",
                                     null,
                                     null);
                     if (c.moveToFirst()) {
--- a/embedding/android/NotificationHandler.java.in
+++ b/embedding/android/NotificationHandler.java.in
@@ -45,16 +45,18 @@ import android.content.BroadcastReceiver
 import android.content.Context;
 import android.os.Bundle;
 import android.util.Log;
 import android.net.Uri;
 
 public class NotificationHandler
     extends BroadcastReceiver
 {
+    private static final String LOGTAG = "GeckoNotificationHandler";
+
     @Override
     public void onReceive(Context context, Intent intent) {
         if (intent != null)
             handleIntent(context, intent);
     }
 
     protected void handleIntent(Context context, Intent notificationIntent) {
         String action = notificationIntent.getAction();
@@ -63,24 +65,24 @@ public class NotificationHandler
         Uri data = notificationIntent.getData();
         if (data != null) {
             alertName = data.getSchemeSpecificPart();
             alertCookie = data.getFragment();
             if (alertCookie == null)
                 alertCookie = "";
         }
 
-        Log.i("GeckoAppJava", "NotificationHandler.handleIntent\n" +
+        Log.i(LOGTAG, "NotificationHandler.handleIntent\n" +
               "- action = '" + action + "'\n" +
               "- alertName = '" + alertName + "'\n" +
               "- alertCookie = '" + alertCookie + "'");
 
         int notificationID = alertName.hashCode();
 
-        Log.i("GeckoAppJava", "Handle notification ID " + notificationID);
+        Log.i(LOGTAG, "Handle notification ID " + notificationID);
 
         if (App.mAppContext != null) {
             // This should call the observer, if any
             App.mAppContext.handleNotification(action, alertName, alertCookie);
         } else {
             // The app is not running, just cancel this notification
             NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
             notificationManager.cancel(notificationID);
@@ -88,17 +90,17 @@ public class NotificationHandler
 
         if (App.ACTION_ALERT_CLICK.equals(action)) {
             // Start or bring to front the main activity
             Intent appIntent = new Intent(Intent.ACTION_MAIN);
             appIntent.setClassName(context, "@ANDROID_PACKAGE_NAME@.App");
             appIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
             appIntent.putExtra("args", "-alert " + alertName + (alertCookie.length() > 0 ? "#" + alertCookie : ""));
             try {
-                Log.i("GeckoAppJava", "startActivity with intent: Action='" + appIntent.getAction() + "'" +
+                Log.i(LOGTAG, "startActivity with intent: Action='" + appIntent.getAction() + "'" +
                       ", args='" + appIntent.getStringExtra("args") + "'" );
                 context.startActivity(appIntent);
             } catch (ActivityNotFoundException e) {
-                Log.e("GeckoAppJava", "NotificationHandler Exception: ", e);
+                Log.e(LOGTAG, "NotificationHandler Exception: ", e);
             }
         }
     }
 }
--- a/embedding/android/PromptService.java
+++ b/embedding/android/PromptService.java
@@ -67,19 +67,20 @@ import android.content.DialogInterface.O
 import org.json.JSONArray;
 import org.json.JSONObject;
 import android.text.method.PasswordTransformationMethod;
 import android.graphics.Color;
 import android.text.InputType;
 import android.app.AlertDialog;
 
 public class PromptService implements OnClickListener, OnCancelListener, OnItemClickListener {
+    private static final String LOGTAG = "GeckoPromptService";
+
     private PromptInput[] mInputs;
     private AlertDialog mDialog = null;
-    private static final String LOG_NAME = "GeckoPromptService";
 
     private class PromptButton {
         public String label = "";
         PromptButton(JSONObject aJSONButton) {
             try {
                 label = aJSONButton.getString("label");
             } catch(Exception ex) { }
         }
@@ -263,17 +264,17 @@ public class PromptService implements On
                 ret.put("button", button);
             }
             if (mInputs != null) {
                 for (int i = 0; i < mInputs.length; i++) {
                     ret.put(mInputs[i].getName(), mInputs[i].getValue());
                 }
             }
         } catch(Exception ex) {
-            Log.i(LOG_NAME, "Error building return: " + ex);
+            Log.i(LOGTAG, "Error building return: " + ex);
         }
 
         if (mDialog != null) {
             mDialog.dismiss();
         }
 
         finishDialog(ret.toString());
     }
--- a/embedding/android/Restarter.java.in
+++ b/embedding/android/Restarter.java.in
@@ -41,20 +41,21 @@ package @ANDROID_PACKAGE_NAME@;
 import android.app.*;
 import android.content.*;
 import android.util.*;
 import android.os.*;
 import java.io.*;
 import org.mozilla.gecko.GeckoAppShell;
 
 public class Restarter extends Activity {
+    private static final String LOGTAG = "GeckoRestarter";
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
-        Log.i("Restarter", "trying to restart @MOZ_APP_NAME@");
+        Log.i(LOGTAG, "trying to restart @MOZ_APP_NAME@");
         try {
             int countdown = 40;
             while (GeckoAppShell.checkForGeckoProcs() &&  --countdown > 0) {
                 // Wait for the old process to die before we continue
                 try {
                     Thread.currentThread().sleep(100);
                 } catch (InterruptedException ie) {}
             }
@@ -66,29 +67,29 @@ public class Restarter extends Activity 
                 // wait for the kill to take effect
                 while (GeckoAppShell.checkForGeckoProcs() &&  --countdown > 0) {
                     try {
                         Thread.currentThread().sleep(100);
                     } catch (InterruptedException ie) {}
                 }
             }
         } catch (Exception e) {
-            Log.i("Restarter", e.toString());
+            Log.i(LOGTAG, e.toString());
         }
         try {
             String action = "android.intent.action.MAIN";
             Intent intent = new Intent(action);
             intent.setClassName("@ANDROID_PACKAGE_NAME@",
                                 "@ANDROID_PACKAGE_NAME@.App");
             Bundle b = getIntent().getExtras();
             if (b != null)
                 intent.putExtras(b);
             intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            Log.i("GeckoAppJava", intent.toString());
+            Log.i(LOGTAG, intent.toString());
             startActivity(intent);
         } catch (Exception e) {
-            Log.i("Restarter", e.toString());
+            Log.i(LOGTAG, e.toString());
         }
         // Give the new process time to start before we die
         GeckoAppShell.waitForAnotherGeckoProc();
         System.exit(0);
     }
 };
--- a/embedding/android/Tab.java
+++ b/embedding/android/Tab.java
@@ -52,18 +52,18 @@ import java.io.InputStream;
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 
 public class Tab {
+    private static final String LOGTAG = "GeckoTab";
 
-    private static final String LOG_NAME = "Tab";
     private int mId;
     private String mUrl;
     private String mTitle;
     private Drawable mFavicon;
     private String mFaviconUrl;
     private String mSecurityMode;
     private Drawable mThumbnail;
     private List<HistoryEntry> mHistory;
@@ -138,40 +138,40 @@ public class Tab {
 
     public boolean isBookmark() {
         return mBookmark;
     }
 
     public void updateURL(String url) {
         if (url != null && url.length() > 0) {
             mUrl = new String(url);
-            Log.i(LOG_NAME, "Updated url: " + url + " for tab with id: " + mId);
+            Log.i(LOGTAG, "Updated url: " + url + " for tab with id: " + mId);
             updateBookmark();
         }
     }
 
     public void updateTitle(String title) {
         if (title != null && title.length() > 0) {
             mTitle = new String(title);
         } else {
             mTitle = "";
         }
 
-        Log.i(LOG_NAME, "Updated title: " + mTitle + " for tab with id: " + mId);
+        Log.i(LOGTAG, "Updated title: " + mTitle + " for tab with id: " + mId);
 
         final HistoryEntry he = getLastHistoryEntry();
         if (he != null) {
             he.mTitle = mTitle;
             GeckoAppShell.getHandler().post(new Runnable() {
                 public void run() {
                     GlobalHistory.getInstance().update(he.mUri, he.mTitle);
                 }
             });
         } else {
-            Log.e(LOG_NAME, "Requested title update on empty history stack");
+            Log.e(LOGTAG, "Requested title update on empty history stack");
         }
     }
 
     public void setLoading(boolean loading) {
         mLoading = loading;
     }
 
     private void setBookmark(boolean bookmark) {
@@ -181,22 +181,22 @@ public class Tab {
     public HistoryEntry getLastHistoryEntry() {
         if (mHistory.isEmpty())
             return null;
         return mHistory.get(mHistoryIndex);
     }
 
     public void updateFavicon(Drawable favicon) {
         mFavicon = favicon;
-        Log.i(LOG_NAME, "Updated favicon for tab with id: " + mId);
+        Log.i(LOGTAG, "Updated favicon for tab with id: " + mId);
     }
 
     public void updateFaviconURL(String faviconUrl) {
         mFaviconUrl = faviconUrl;
-        Log.i(LOG_NAME, "Updated favicon URL for tab with id: " + mId);
+        Log.i(LOGTAG, "Updated favicon URL for tab with id: " + mId);
     }
 
     public void updateSecurityMode(String mode) {
         mSecurityMode = mode;
     }
 
     private void updateBookmark() {
         new CheckBookmarkTask().execute();
@@ -291,30 +291,30 @@ public class Tab {
             mHistory.add(he);
             GeckoAppShell.getHandler().post(new Runnable() {
                 public void run() {
                     GlobalHistory.getInstance().add(uri);
                 }
             });
         } else if (event.equals("Back")) {
             if (mHistoryIndex - 1 < 0) {
-                Log.e(LOG_NAME, "Received unexpected back notification");
+                Log.e(LOGTAG, "Received unexpected back notification");
                 return;
             }
             mHistoryIndex--;
         } else if (event.equals("Forward")) {
             if (mHistoryIndex + 1 >= mHistory.size()) {
-                Log.e(LOG_NAME, "Received unexpected forward notification");
+                Log.e(LOGTAG, "Received unexpected forward notification");
                 return;
             }
             mHistoryIndex++;
         } else if (event.equals("Goto")) {
             int index = message.getInt("index");
             if (index < 0 || index >= mHistory.size()) {
-                Log.e(LOG_NAME, "Received unexpected history-goto notification");
+                Log.e(LOGTAG, "Received unexpected history-goto notification");
                 return;
             }
             mHistoryIndex = index;
         } else if (event.equals("Purge")) {
             mHistory.clear();
             mHistoryIndex = -1;
         }
     }
--- a/embedding/android/Tabs.java
+++ b/embedding/android/Tabs.java
@@ -41,18 +41,18 @@ import java.util.*;
 
 import android.content.ContentResolver;
 import android.graphics.drawable.*;
 import android.util.Log;
 
 import org.json.JSONObject;
 
 public class Tabs implements GeckoEventListener {
+    private static final String LOGTAG = "GeckoTabs";
 
-    private static final String LOG_NAME = "Tabs";
     private static int selectedTab = -1;
     private HashMap<Integer, Tab> tabs;
     private ArrayList<Tab> order;
     private ContentResolver resolver;
 
     private Tabs() {
         tabs = new HashMap<Integer, Tab>();
         order = new ArrayList<Tab>();
@@ -69,25 +69,25 @@ public class Tabs implements GeckoEventL
 
     public Tab addTab(int id, String url) {
         if (tabs.containsKey(id))
            return tabs.get(id);
 
         Tab tab = new Tab(id, url);
         tabs.put(id, tab);
         order.add(tab);
-        Log.i(LOG_NAME, "Added a tab with id: " + id + ", url: " + url);
+        Log.i(LOGTAG, "Added a tab with id: " + id + ", url: " + url);
         return tab;
     }
 
     public void removeTab(int id) {
         if (tabs.containsKey(id)) {
             order.remove(getTab(id));
             tabs.remove(id);
-            Log.i(LOG_NAME, "Removed a tab with id: " + id);
+            Log.i(LOGTAG, "Removed a tab with id: " + id);
         }
     }
 
     public Tab selectTab(int id) {
         if (!tabs.containsKey(id))
             return null;
  
         selectedTab = id;
@@ -165,12 +165,12 @@ public class Tabs implements GeckoEventL
             if (event.startsWith("SessionHistory:")) {
                 Tab tab = getTab(message.getInt("tabID"));
                 if (tab != null) {
                     event = event.substring("SessionHistory:".length());
                     tab.handleSessionHistoryMessage(event, message);
                 }
             }
         } catch (Exception e) { 
-            Log.i(LOG_NAME, "handleMessage throws " + e + " for message: " + event);
+            Log.i(LOGTAG, "handleMessage throws " + e + " for message: " + event);
         }
     }
 }
--- a/embedding/android/ui/PanZoomController.java
+++ b/embedding/android/ui/PanZoomController.java
@@ -57,17 +57,17 @@ import java.util.TimerTask;
  *
  * Many ideas are from Joe Hewitt's Scrollability:
  *   https://github.com/joehewitt/scrollability/
  */
 public class PanZoomController
     extends GestureDetector.SimpleOnGestureListener
     implements ScaleGestureDetector.OnScaleGestureListener
 {
-    private static final String LOG_NAME = "PanZoomController";
+    private static final String LOGTAG = "GeckoPanZoomController";
 
     private LayerController mController;
 
     private static final float FRICTION = 0.97f;
     // Animation stops if the velocity is below this value.
     private static final float STOPPED_THRESHOLD = 4.0f;
     // The percentage of the surface which can be overscrolled before it must snap back.
     private static final float SNAP_LIMIT = 0.75f;
@@ -143,52 +143,52 @@ public class PanZoomController
             return false;
         case TOUCHING:
         case PANNING:
         case PANNING_HOLD:
         case PINCHING:
             mState = PanZoomState.PINCHING;
             return false;
         }
-        Log.e(LOG_NAME, "Unhandled case " + mState + " in onTouchStart");
+        Log.e(LOGTAG, "Unhandled case " + mState + " in onTouchStart");
         return false;
     }
 
     private boolean onTouchMove(MotionEvent event) {
         switch (mState) {
         case NOTHING:
         case FLING:
             // should never happen
-            Log.e(LOG_NAME, "Received impossible touch move while in " + mState);
+            Log.e(LOGTAG, "Received impossible touch move while in " + mState);
             return false;
         case TOUCHING:
             mLastTimestamp = System.currentTimeMillis();
             if (panDistance(event) < PAN_THRESHOLD)
                 return false;
             // fall through
         case PANNING_HOLD:
             mState = PanZoomState.PANNING;
             // fall through
         case PANNING:
             track(event, System.currentTimeMillis());
             return true;
         case PINCHING:
             // scale gesture listener will handle this
             return false;
         }
-        Log.e(LOG_NAME, "Unhandled case " + mState + " in onTouchMove");
+        Log.e(LOGTAG, "Unhandled case " + mState + " in onTouchMove");
         return false;
     }
 
     private boolean onTouchEnd(MotionEvent event) {
         switch (mState) {
         case NOTHING:
         case FLING:
             // should never happen
-            Log.e(LOG_NAME, "Received impossible touch end while in " + mState);
+            Log.e(LOGTAG, "Received impossible touch end while in " + mState);
             return false;
         case TOUCHING:
             mState = PanZoomState.NOTHING;
             // TODO: send click to gecko
             return false;
         case PANNING:
         case PANNING_HOLD:
             mState = PanZoomState.FLING;
@@ -205,17 +205,17 @@ public class PanZoomController
                 mState = PanZoomState.TOUCHING;
                 mX.touchPos = event.getX(pointRemainingIndex);
                 mY.touchPos = event.getY(pointRemainingIndex);
             } else {
                 // still pinching, do nothing
             }
             return true;
         }
-        Log.e(LOG_NAME, "Unhandled case " + mState + " in onTouchEnd");
+        Log.e(LOGTAG, "Unhandled case " + mState + " in onTouchEnd");
         return false;
     }
 
     private boolean onTouchCancel(MotionEvent event) {
         mState = PanZoomState.NOTHING;
         return false;
     }
 
@@ -596,15 +596,15 @@ public class PanZoomController
             PointF point = new PointF(motionEvent.getX(), motionEvent.getY());
             point = mController.convertViewPointToLayerPoint(point);
             if (point == null) {
                 return;
             }
             ret.put("x", (int)Math.round(point.x));
             ret.put("y", (int)Math.round(point.y));
         } catch(Exception ex) {
-            Log.w(LOG_NAME, "Error building return: " + ex);
+            Log.w(LOGTAG, "Error building return: " + ex);
         }
 
         GeckoEvent e = new GeckoEvent("Gesture:LongPress", ret.toString());
         GeckoAppShell.sendEventToGecko(e);
     }
 }