Refactoring the logging interface to remove dependence on NPP.
diff --git a/samples/BrowserPlugin/jni/animation/AnimationPlugin.cpp b/samples/BrowserPlugin/jni/animation/AnimationPlugin.cpp
index b6175c1..72a11c9 100644
--- a/samples/BrowserPlugin/jni/animation/AnimationPlugin.cpp
+++ b/samples/BrowserPlugin/jni/animation/AnimationPlugin.cpp
@@ -85,7 +85,7 @@
     ANPEventFlags flags = kTouch_ANPEventFlag;
     NPError err = browser->setvalue(inst, kAcceptEvents_ANPSetValue, &flags);
     if (err != NPERR_NO_ERROR) {
-        gLogI.log(inst, kError_ANPLogType, "Error selecting input events.");
+        gLogI.log(kError_ANPLogType, "Error selecting input events.");
     }
 }
 
diff --git a/samples/BrowserPlugin/jni/audio/AudioPlugin.cpp b/samples/BrowserPlugin/jni/audio/AudioPlugin.cpp
index 58d340c..9731f19 100644
--- a/samples/BrowserPlugin/jni/audio/AudioPlugin.cpp
+++ b/samples/BrowserPlugin/jni/audio/AudioPlugin.cpp
@@ -99,7 +99,7 @@
 
     // open a file stream
     FILE* f = fopen(path, "r");
-    gLogI.log(inst, kDebug_ANPLogType, "--- path %s FILE %p", path, f);
+    gLogI.log(kDebug_ANPLogType, "--- path %s FILE %p", path, f);
 
     // setup our private audio struct's default values
     m_soundPlay = new SoundPlay;
@@ -123,13 +123,13 @@
     struct stat fileStatus;
 
     if(fileDescriptor <= 0) {
-        gLogI.log(inst, kError_ANPLogType, "fopen error");
+        gLogI.log(kError_ANPLogType, "fopen error");
     }
     else if (fstat(fileDescriptor, &fileStatus) != 0) {
-        gLogI.log(inst, kDebug_ANPLogType, "File Size: %d", fileStatus.st_size);
+        gLogI.log(kDebug_ANPLogType, "File Size: %d", fileStatus.st_size);
         m_soundPlay->fileSize = fileStatus.st_size;
     } else {
-        gLogI.log(inst, kError_ANPLogType, "fstat error");
+        gLogI.log(kError_ANPLogType, "fstat error");
     }
 
     // configure the UI elements
@@ -169,7 +169,7 @@
     ANPEventFlags flags = kTouch_ANPEventFlag;
     NPError err = browser->setvalue(inst, kAcceptEvents_ANPSetValue, &flags);
     if (err != NPERR_NO_ERROR) {
-        gLogI.log(inst, kError_ANPLogType, "Error selecting input events.");
+        gLogI.log(kError_ANPLogType, "Error selecting input events.");
     }
 }
 
@@ -203,10 +203,10 @@
 }
 
 void AudioPlugin::draw(ANPCanvas* canvas) {
-    NPP instance = this->inst();
-    PluginObject *obj = (PluginObject*) instance->pdata;
 
-    gLogI.log(instance, kError_ANPLogType, "Drawing");
+    PluginObject *obj = (PluginObject*) this->inst()->pdata;
+
+    gLogI.log(kError_ANPLogType, "Drawing");
 
     const float trackHeight = 30;
     const float buttonWidth = 60;
@@ -332,7 +332,7 @@
 
     // if the track is null then return
     if (NULL == m_soundPlay->track) {
-        gLogI.log(instance, kError_ANPLogType, "---- %p unable to create track",
+        gLogI.log(kError_ANPLogType, "---- %p unable to create track",
                   instance);
         return;
     }
@@ -344,7 +344,7 @@
 
     if (currentRect == &m_playRect) {
 
-        gLogI.log(instance, kDebug_ANPLogType, "---- %p starting track (%d)",
+        gLogI.log(kDebug_ANPLogType, "---- %p starting track (%d)",
                   m_soundPlay->track, gSoundI.isStopped(m_soundPlay->track));
 
         if (gSoundI.isStopped(m_soundPlay->track)) {
@@ -353,7 +353,7 @@
     }
     else if (currentRect == &m_pauseRect) {
 
-        gLogI.log(instance, kDebug_ANPLogType, "---- %p pausing track (%d)",
+        gLogI.log(kDebug_ANPLogType, "---- %p pausing track (%d)",
                   m_soundPlay->track, gSoundI.isStopped(m_soundPlay->track));
 
         if (!gSoundI.isStopped(m_soundPlay->track)) {
@@ -362,7 +362,7 @@
     }
     else if (currentRect == &m_stopRect) {
 
-        gLogI.log(instance, kDebug_ANPLogType, "---- %p stopping track (%d)",
+        gLogI.log(kDebug_ANPLogType, "---- %p stopping track (%d)",
                   m_soundPlay->track, gSoundI.isStopped(m_soundPlay->track));
 
         if (!gSoundI.isStopped(m_soundPlay->track)) {
diff --git a/samples/BrowserPlugin/jni/background/BackgroundPlugin.cpp b/samples/BrowserPlugin/jni/background/BackgroundPlugin.cpp
index 0f90291..69e4854 100644
--- a/samples/BrowserPlugin/jni/background/BackgroundPlugin.cpp
+++ b/samples/BrowserPlugin/jni/background/BackgroundPlugin.cpp
@@ -111,7 +111,7 @@
 
     // check to make sure the zoom level is uniform
     if (zoomFactorW + .01 < zoomFactorH && zoomFactorW - .01 > zoomFactorH)
-        gLogI.log(inst(), kError_ANPLogType, " ------ %p zoom is out of sync (%f,%f)",
+        gLogI.log(kError_ANPLogType, " ------ %p zoom is out of sync (%f,%f)",
                   inst(), zoomFactorW, zoomFactorH);
 
     // scale the variables based on the zoom level
@@ -123,7 +123,7 @@
     JNIEnv* env = NULL;
     if (!m_surface || gVM->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK ||
         !gSurfaceI.lock(env, m_surface, &bitmap, NULL)) {
-        gLogI.log(inst(), kError_ANPLogType, " ------ %p unable to lock the plugin", inst());
+        gLogI.log(kError_ANPLogType, " ------ %p unable to lock the plugin", inst());
         return;
     }
 
@@ -156,19 +156,19 @@
 int16 BackgroundPlugin::handleEvent(const ANPEvent* evt) {
     switch (evt->eventType) {
         case kDraw_ANPEventType:
-            gLogI.log(inst(), kError_ANPLogType, " ------ %p the plugin did not request draw events", inst());
+            gLogI.log(kError_ANPLogType, " ------ %p the plugin did not request draw events", inst());
             break;
         case kLifecycle_ANPEventType:
             if (evt->data.lifecycle.action == kOnLoad_ANPLifecycleAction) {
-                gLogI.log(inst(), kDebug_ANPLogType, " ------ %p the plugin received an onLoad event", inst());
+                gLogI.log(kDebug_ANPLogType, " ------ %p the plugin received an onLoad event", inst());
                 return 1;
             }
             break;
         case kTouch_ANPEventType:
-            gLogI.log(inst(), kError_ANPLogType, " ------ %p the plugin did not request touch events", inst());
+            gLogI.log(kError_ANPLogType, " ------ %p the plugin did not request touch events", inst());
             break;
         case kKey_ANPEventType:
-            gLogI.log(inst(), kError_ANPLogType, " ------ %p the plugin did not request key events", inst());
+            gLogI.log(kError_ANPLogType, " ------ %p the plugin did not request key events", inst());
             break;
         default:
             break;
@@ -185,9 +185,9 @@
     NPP instance = this->inst();
 
     //LOG_ERROR(instance, " ------ %p Testing Log Error", instance);
-    gLogI.log(instance, kError_ANPLogType, " ------ %p Testing Log Error", instance);
-    gLogI.log(instance, kWarning_ANPLogType, " ------ %p Testing Log Warning", instance);
-    gLogI.log(instance, kDebug_ANPLogType, " ------ %p Testing Log Debug", instance);
+    gLogI.log(kError_ANPLogType, " ------ %p Testing Log Error", instance);
+    gLogI.log(kWarning_ANPLogType, " ------ %p Testing Log Warning", instance);
+    gLogI.log(kDebug_ANPLogType, " ------ %p Testing Log Debug", instance);
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -225,13 +225,13 @@
 }
 
 static void timer_oneshot(NPP instance, uint32 timerID) {
-    gLogI.log(instance, kDebug_ANPLogType, "-------- oneshot timer\n");
+    gLogI.log(kDebug_ANPLogType, "-------- oneshot timer\n");
 }
 
 static void timer_repeat(NPP instance, uint32 timerID) {
     BackgroundPlugin *obj = ((BackgroundPlugin*) ((PluginObject*) instance->pdata)->activePlugin);
 
-    gLogI.log(instance, kDebug_ANPLogType, "-------- repeat timer %d\n",
+    gLogI.log(kDebug_ANPLogType, "-------- repeat timer %d\n",
               obj->mTimerRepeatCount);
     if (--obj->mTimerRepeatCount == 0) {
         browser->unscheduletimer(instance, timerID);
@@ -239,7 +239,7 @@
 }
 
 static void timer_neverfires(NPP instance, uint32 timerID) {
-    gLogI.log(instance, kError_ANPLogType, "-------- timer_neverfires!!!\n");
+    gLogI.log(kError_ANPLogType, "-------- timer_neverfires!!!\n");
 }
 
 static void timer_latency(NPP instance, uint32 timerID) {
@@ -256,7 +256,7 @@
 
     obj->mPrevTime = now;
 
-    gLogI.log(instance, kDebug_ANPLogType,
+    gLogI.log(kDebug_ANPLogType,
               "-------- latency test: [%3d] interval %d expected %d, total %d expected %d, drift %d avg %d\n",
               obj->mTimerLatencyCurrentCount, interval, TIMER_INTERVAL, dur,
               expectedDur, drift, avgDrift);
@@ -291,7 +291,7 @@
     ANPPixelPacking packing;
     for (size_t i = 0; i < ARRAY_COUNT(gRecs); i++) {
         if (gBitmapI.getPixelPacking(gRecs[i].fFormat, &packing)) {
-            gLogI.log(instance, kDebug_ANPLogType,
+            gLogI.log(kDebug_ANPLogType,
                       "pixel format [%d] %s has packing ARGB [%d %d] [%d %d] [%d %d] [%d %d]\n",
                       gRecs[i].fFormat, gRecs[i].fName,
                       packing.AShift, packing.ABits,
@@ -299,7 +299,7 @@
                       packing.GShift, packing.GBits,
                       packing.BShift, packing.BBits);
         } else {
-            gLogI.log(instance, kDebug_ANPLogType,
+            gLogI.log(kDebug_ANPLogType,
                       "pixel format [%d] %s has no packing\n",
                       gRecs[i].fFormat, gRecs[i].fName);
         }
@@ -312,18 +312,18 @@
     // check default & set transparent
     if (!mFinishedStageOne) {
 
-        gLogI.log(instance, kDebug_ANPLogType, "BEGIN: testing bitmap transparency");
+        gLogI.log(kDebug_ANPLogType, "BEGIN: testing bitmap transparency");
 
         //check to make sure it is not transparent
         if (evt->data.draw.data.bitmap.format == kRGBA_8888_ANPBitmapFormat) {
-            gLogI.log(instance, kError_ANPLogType, "bitmap default format is transparent");
+            gLogI.log(kError_ANPLogType, "bitmap default format is transparent");
         }
 
         //make it transparent (any non-null value will set it to true)
         bool value = true;
         NPError err = browser->setvalue(instance, NPPVpluginTransparentBool, &value);
         if (err != NPERR_NO_ERROR) {
-            gLogI.log(instance, kError_ANPLogType, "Error setting transparency.");
+            gLogI.log(kError_ANPLogType, "Error setting transparency.");
         }
 
         mFinishedStageOne = true;
@@ -334,13 +334,13 @@
 
         //check to make sure it is transparent
         if (evt->data.draw.data.bitmap.format != kRGBA_8888_ANPBitmapFormat) {
-            gLogI.log(instance, kError_ANPLogType, "bitmap did not change to transparent format");
+            gLogI.log(kError_ANPLogType, "bitmap did not change to transparent format");
         }
 
         //make it opaque
         NPError err = browser->setvalue(instance, NPPVpluginTransparentBool, NULL);
         if (err != NPERR_NO_ERROR) {
-            gLogI.log(instance, kError_ANPLogType, "Error setting transparency.");
+            gLogI.log(kError_ANPLogType, "Error setting transparency.");
         }
 
         mFinishedStageTwo = true;
@@ -350,10 +350,10 @@
 
         //check to make sure it is not transparent
         if (evt->data.draw.data.bitmap.format == kRGBA_8888_ANPBitmapFormat) {
-            gLogI.log(instance, kError_ANPLogType, "bitmap default format is transparent");
+            gLogI.log(kError_ANPLogType, "bitmap default format is transparent");
         }
 
-        gLogI.log(instance, kDebug_ANPLogType, "END: testing bitmap transparency");
+        gLogI.log(kDebug_ANPLogType, "END: testing bitmap transparency");
 
         mFinishedStageThree = true;
     }
@@ -366,14 +366,14 @@
 void BackgroundPlugin::test_domAccess() {
     NPP instance = this->inst();
 
-    gLogI.log(instance, kDebug_ANPLogType, " ------ %p Testing DOM Access", instance);
+    gLogI.log(kDebug_ANPLogType, " ------ %p Testing DOM Access", instance);
 
     // Get the plugin's DOM object
     NPObject* windowObject = NULL;
     browser->getvalue(instance, NPNVWindowNPObject, &windowObject);
 
     if (!windowObject)
-        gLogI.log(instance, kError_ANPLogType, " ------ %p Unable to retrieve DOM Window", instance);
+        gLogI.log(kError_ANPLogType, " ------ %p Unable to retrieve DOM Window", instance);
 
     // Retrieve a property from the plugin's DOM object
     NPIdentifier topIdentifier = browser->getstringidentifier("top");
@@ -381,7 +381,7 @@
     browser->getproperty(instance, windowObject, topIdentifier, &topObjectVariant);
 
     if (topObjectVariant.type != NPVariantType_Object)
-        gLogI.log(instance, kError_ANPLogType, " ------ %p Invalid Variant type for DOM Property: %d,%d", instance, topObjectVariant.type, NPVariantType_Object);
+        gLogI.log(kError_ANPLogType, " ------ %p Invalid Variant type for DOM Property: %d,%d", instance, topObjectVariant.type, NPVariantType_Object);
 }
 
 
@@ -393,14 +393,14 @@
 void BackgroundPlugin::test_javascript() {
     NPP instance = this->inst();
 
-    gLogI.log(instance, kDebug_ANPLogType, " ------ %p Testing JavaScript Access", instance);
+    gLogI.log(kDebug_ANPLogType, " ------ %p Testing JavaScript Access", instance);
 
     // Get the plugin's DOM object
     NPObject* windowObject = NULL;
     browser->getvalue(instance, NPNVWindowNPObject, &windowObject);
 
     if (!windowObject)
-        gLogI.log(instance, kError_ANPLogType, " ------ %p Unable to retrieve DOM Window", instance);
+        gLogI.log(kError_ANPLogType, " ------ %p Unable to retrieve DOM Window", instance);
 
     // create a string (JS code) that is stored in memory allocated by the browser
     const char* jsString = "1200 + 34";
@@ -411,13 +411,13 @@
     NPString script = { (char*)stringMem, strlen(jsString) };
     NPVariant scriptVariant;
     if (!browser->evaluate(instance, windowObject, &script, &scriptVariant))
-        gLogI.log(instance, kError_ANPLogType, " ------ %p Unable to eval the JS.", instance);
+        gLogI.log(kError_ANPLogType, " ------ %p Unable to eval the JS.", instance);
 
     if (scriptVariant.type == NPVariantType_Int32) {
         if (scriptVariant.value.intValue != 1234)
-            gLogI.log(instance, kError_ANPLogType, " ------ %p Invalid Value for JS Return: %d,1234", instance, scriptVariant.value.intValue);
+            gLogI.log(kError_ANPLogType, " ------ %p Invalid Value for JS Return: %d,1234", instance, scriptVariant.value.intValue);
     } else {
-        gLogI.log(instance, kError_ANPLogType, " ------ %p Invalid Variant type for JS Return: %d,%d", instance, scriptVariant.type, NPVariantType_Int32);
+        gLogI.log(kError_ANPLogType, " ------ %p Invalid Variant type for JS Return: %d,%d", instance, scriptVariant.type, NPVariantType_Int32);
     }
 
     // free the memory allocated within the browser
@@ -432,7 +432,7 @@
 
     JNIEnv* env = NULL;
     if (gVM->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
-        gLogI.log(inst(), kError_ANPLogType, " ---- LoadJavaTest: failed to get env");
+        gLogI.log(kError_ANPLogType, " ---- LoadJavaTest: failed to get env");
         return;
     }
 
@@ -440,7 +440,7 @@
     jclass backgroundClass = gSystemI.loadJavaClass(inst(), className);
 
     if(!backgroundClass) {
-        gLogI.log(inst(), kError_ANPLogType, " ---- LoadJavaTest: failed to load class");
+        gLogI.log(kError_ANPLogType, " ---- LoadJavaTest: failed to load class");
         return;
     }
 
@@ -449,13 +449,13 @@
     jobject backgroundObject = env->NewObject(backgroundClass, constructor);
 
     if(!backgroundObject) {
-        gLogI.log(inst(), kError_ANPLogType, " ---- LoadJavaTest: failed to construct object");
+        gLogI.log(kError_ANPLogType, " ---- LoadJavaTest: failed to construct object");
         return;
     }
 
     jint result = env->CallIntMethod(backgroundObject, addMethod, 2, 2);
 
     if (result != 4) {
-        gLogI.log(inst(), kError_ANPLogType, " ---- LoadJavaTest: invalid result (%d != 4)", result);
+        gLogI.log(kError_ANPLogType, " ---- LoadJavaTest: invalid result (%d != 4)", result);
     }
 }
diff --git a/samples/BrowserPlugin/jni/form/FormPlugin.cpp b/samples/BrowserPlugin/jni/form/FormPlugin.cpp
index a92d447..5a536d9 100644
--- a/samples/BrowserPlugin/jni/form/FormPlugin.cpp
+++ b/samples/BrowserPlugin/jni/form/FormPlugin.cpp
@@ -100,7 +100,7 @@
     ANPEventFlags flags = kKey_ANPEventFlag;
     NPError err = browser->setvalue(inst, kAcceptEvents_ANPSetValue, &flags);
     if (err != NPERR_NO_ERROR) {
-        gLogI.log(inst, kError_ANPLogType, "Error selecting input events.");
+        gLogI.log(kError_ANPLogType, "Error selecting input events.");
     }
 }
 
@@ -215,7 +215,7 @@
 
         case kLifecycle_ANPEventType:
             if (evt->data.lifecycle.action == kLoseFocus_ANPLifecycleAction) {
-                gLogI.log(instance, kDebug_ANPLogType, "----%p Loosing Focus", instance);
+                gLogI.log(kDebug_ANPLogType, "----%p Loosing Focus", instance);
 
                 if (m_activeInput) {
                     // hide the keyboard
@@ -230,7 +230,7 @@
                 return 1;
             }
             else if (evt->data.lifecycle.action == kGainFocus_ANPLifecycleAction) {
-                gLogI.log(instance, kDebug_ANPLogType, "----%p Gaining Focus", instance);
+                gLogI.log(kDebug_ANPLogType, "----%p Gaining Focus", instance);
                 m_hasFocus = true;
                 inval(instance);
                 return 1;
@@ -300,7 +300,7 @@
 bool FormPlugin::handleNavigation(ANPKeyCode keyCode) {
     NPP instance = this->inst();
 
-    gLogI.log(instance, kDebug_ANPLogType, "----%p Recvd Nav Key %d", instance, keyCode);
+    gLogI.log(kDebug_ANPLogType, "----%p Recvd Nav Key %d", instance, keyCode);
 
     if (!m_activeInput) {
         gWindowI.showKeyboard(instance, true);
@@ -350,7 +350,7 @@
     input->text[input->charPtr] = static_cast<char>(unichar);
     input->charPtr++;
 
-    gLogI.log(instance, kDebug_ANPLogType, "----%p Text:  %c", instance, unichar);
+    gLogI.log(kDebug_ANPLogType, "----%p Text:  %c", instance, unichar);
 }
 
 void FormPlugin::scrollIntoView(TextInput* input) {
diff --git a/samples/BrowserPlugin/jni/main.cpp b/samples/BrowserPlugin/jni/main.cpp
index af7a589..5bbb648 100644
--- a/samples/BrowserPlugin/jni/main.cpp
+++ b/samples/BrowserPlugin/jni/main.cpp
@@ -173,7 +173,7 @@
             else if (!strcmp(argv[i], "Surface")) {
                model = kSurface_ANPDrawingModel;
             }
-            gLogI.log(instance, kDebug_ANPLogType, "------ %p DrawingModel is %d", instance, model);
+            gLogI.log(kDebug_ANPLogType, "------ %p DrawingModel is %d", instance, model);
             break;
         }
     }
@@ -183,15 +183,15 @@
     NPError err = browser->setvalue(instance, kRequestDrawingModel_ANPSetValue,
                             reinterpret_cast<void*>(model));
     if (err) {
-        gLogI.log(instance, kError_ANPLogType, "request model %d err %d", model, err);
+        gLogI.log(kError_ANPLogType, "request model %d err %d", model, err);
         return err;
     }
 
     const char* path = gSystemI.getApplicationDataDirectory();
     if (path) {
-        gLogI.log(instance, kDebug_ANPLogType, "Application data dir is %s", path);
+        gLogI.log(kDebug_ANPLogType, "Application data dir is %s", path);
     } else {
-        gLogI.log(instance, kError_ANPLogType, "Can't find Application data dir");
+        gLogI.log(kError_ANPLogType, "Can't find Application data dir");
     }
 
     // select the pluginType
@@ -221,21 +221,21 @@
                 obj->pluginType = kVideo_PluginType;
                 obj->activePlugin = new VideoPlugin(instance);
             }
-            gLogI.log(instance, kDebug_ANPLogType, "------ %p PluginType is %d", instance, obj->pluginType);
+            gLogI.log(kDebug_ANPLogType, "------ %p PluginType is %d", instance, obj->pluginType);
             break;
         }
     }
 
     // if no pluginType is specified then default to Animation
     if (!obj->pluginType) {
-        gLogI.log(instance, kError_ANPLogType, "------ %p No PluginType attribute was found", instance);
+        gLogI.log(kError_ANPLogType, "------ %p No PluginType attribute was found", instance);
         obj->pluginType = kAnimation_PluginType;
         obj->activePlugin = new BallAnimation(instance);
     }
 
     // check to ensure the pluginType supports the model
     if (!obj->activePlugin->supportsDrawingModel(model)) {
-        gLogI.log(instance, kError_ANPLogType, "------ %p Unsupported DrawingModel (%d)", instance, model);
+        gLogI.log(kError_ANPLogType, "------ %p Unsupported DrawingModel (%d)", instance, model);
         return NPERR_GENERIC_ERROR;
     }
 
@@ -307,7 +307,7 @@
                 static ANPBitmapFormat currentFormat = -1;
                 if (evt->data.draw.data.bitmap.format != currentFormat) {
                     currentFormat = evt->data.draw.data.bitmap.format;
-                    gLogI.log(instance, kDebug_ANPLogType, "---- %p Draw (bitmap)"
+                    gLogI.log(kDebug_ANPLogType, "---- %p Draw (bitmap)"
                               " clip=%d,%d,%d,%d format=%d", instance,
                               evt->data.draw.clip.left,
                               evt->data.draw.clip.top,
@@ -319,7 +319,7 @@
             break;
 
         case kKey_ANPEventType:
-            gLogI.log(instance, kDebug_ANPLogType, "---- %p Key action=%d"
+            gLogI.log(kDebug_ANPLogType, "---- %p Key action=%d"
                       " code=%d vcode=%d unichar=%d repeat=%d mods=%x", instance,
                       evt->data.key.action,
                       evt->data.key.nativeCode,
@@ -330,37 +330,37 @@
             break;
 
         case kLifecycle_ANPEventType:
-            gLogI.log(instance, kDebug_ANPLogType, "---- %p Lifecycle action=%d",
+            gLogI.log(kDebug_ANPLogType, "---- %p Lifecycle action=%d",
                                 instance, evt->data.lifecycle.action);
             break;
 
        case kTouch_ANPEventType:
-            gLogI.log(instance, kDebug_ANPLogType, "---- %p Touch action=%d [%d %d]",
+            gLogI.log(kDebug_ANPLogType, "---- %p Touch action=%d [%d %d]",
                       instance, evt->data.touch.action, evt->data.touch.x,
                       evt->data.touch.y);
             break;
 
        case kMouse_ANPEventType:
-            gLogI.log(instance, kDebug_ANPLogType, "---- %p Mouse action=%d [%d %d]",
+            gLogI.log(kDebug_ANPLogType, "---- %p Mouse action=%d [%d %d]",
                       instance, evt->data.mouse.action, evt->data.mouse.x,
                       evt->data.mouse.y);
             break;
 
        case kVisibleRect_ANPEventType:
-            gLogI.log(instance, kDebug_ANPLogType, "---- %p VisibleRect [%d %d %d %d]",
+            gLogI.log(kDebug_ANPLogType, "---- %p VisibleRect [%d %d %d %d]",
                       instance, evt->data.visibleRect.rect.left, evt->data.visibleRect.rect.top,
                       evt->data.visibleRect.rect.right, evt->data.visibleRect.rect.bottom);
             break;
 
         default:
-            gLogI.log(instance, kError_ANPLogType, "---- %p Unknown Event [%d]",
+            gLogI.log(kError_ANPLogType, "---- %p Unknown Event [%d]",
                       instance, evt->eventType);
             break;
     }
 #endif
 
     if(!obj->activePlugin) {
-        gLogI.log(instance, kError_ANPLogType, "the active plugin is null.");
+        gLogI.log(kError_ANPLogType, "the active plugin is null.");
         return 0; // unknown or unhandled event
     }
     else {
diff --git a/samples/BrowserPlugin/jni/paint/PaintPlugin.cpp b/samples/BrowserPlugin/jni/paint/PaintPlugin.cpp
index 11f00fe..80f05e4 100644
--- a/samples/BrowserPlugin/jni/paint/PaintPlugin.cpp
+++ b/samples/BrowserPlugin/jni/paint/PaintPlugin.cpp
@@ -56,7 +56,7 @@
     // initialize the path
     m_touchPath = gPathI.newPath();
     if(!m_touchPath)
-        gLogI.log(inst, kError_ANPLogType, "----%p Unable to create the touch path", inst);
+        gLogI.log(kError_ANPLogType, "----%p Unable to create the touch path", inst);
 
     // initialize the paint colors
     m_paintSurface = gPaintI.newPaint();
@@ -77,7 +77,7 @@
     ANPEventFlags flags = kTouch_ANPEventFlag;
     NPError err = browser->setvalue(inst, kAcceptEvents_ANPSetValue, &flags);
     if (err != NPERR_NO_ERROR) {
-        gLogI.log(inst, kError_ANPLogType, "Error selecting input events.");
+        gLogI.log(kError_ANPLogType, "Error selecting input events.");
     }
 }
 
@@ -227,7 +227,7 @@
     const int pH = obj->window->height;
     // compare to the plugin's surface dimensions
     if (pW != width || pH != height)
-        gLogI.log(inst(), kError_ANPLogType,
+        gLogI.log(kError_ANPLogType,
                   "----%p Invalid Surface Dimensions (%d,%d):(%d,%d)",
                   inst(), pW, pH, width, height);
 }
@@ -275,7 +275,7 @@
         case kMouse_ANPEventType: {
 
             if (m_isTouchActive)
-                gLogI.log(inst(), kError_ANPLogType, "----%p Received unintended mouse event", inst());
+                gLogI.log(kError_ANPLogType, "----%p Received unintended mouse event", inst());
 
             if (kDown_ANPMouseAction == evt->data.mouse.action) {
                 ANPRectF* rect = validTouch(evt->data.mouse.x, evt->data.mouse.y);
diff --git a/samples/BrowserPlugin/jni/video/VideoPlugin.cpp b/samples/BrowserPlugin/jni/video/VideoPlugin.cpp
index 2609af6..2227a11 100644
--- a/samples/BrowserPlugin/jni/video/VideoPlugin.cpp
+++ b/samples/BrowserPlugin/jni/video/VideoPlugin.cpp
@@ -39,7 +39,7 @@
 extern ANPPaintInterfaceV0     gPaintI;
 extern ANPSurfaceInterfaceV0   gSurfaceI;
 extern ANPTypefaceInterfaceV0  gTypefaceI;
-extern ANPWindowInterfaceV0  gWindowI;
+extern ANPWindowInterfaceV0    gWindowI;
 
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -52,7 +52,7 @@
     ANPEventFlags flags = kTouch_ANPEventFlag;
     NPError err = browser->setvalue(inst, kAcceptEvents_ANPSetValue, &flags);
     if (err != NPERR_NO_ERROR) {
-        gLogI.log(inst, kError_ANPLogType, "Error selecting input events.");
+        gLogI.log(kError_ANPLogType, "Error selecting input events.");
     }
 }
 
@@ -74,7 +74,7 @@
 }
 
 void VideoPlugin::surfaceChanged(int format, int width, int height) {
-    gLogI.log(inst(), kDebug_ANPLogType, "----%p SurfaceChanged Event: %d",
+    gLogI.log(kDebug_ANPLogType, "----%p SurfaceChanged Event: %d",
               inst(), format);
     drawPlugin();
 }
@@ -93,7 +93,7 @@
     JNIEnv* env = NULL;
     if (!m_surface || gVM->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK ||
         !gSurfaceI.lock(env, m_surface, &bitmap, NULL)) {
-            gLogI.log(inst(), kError_ANPLogType, "----%p Unable to Lock Surface", inst());
+            gLogI.log(kError_ANPLogType, "----%p Unable to Lock Surface", inst());
             return;
     }
 
@@ -106,7 +106,7 @@
 
     // compare DOM dimensions to the plugin's surface dimensions
     if (pW != bitmap.width || pH != bitmap.height)
-        gLogI.log(inst(), kError_ANPLogType,
+        gLogI.log(kError_ANPLogType,
                   "----%p Invalid Surface Dimensions (%d,%d):(%d,%d)",
                   inst(), pW, pH, bitmap.width, bitmap.height);
 
@@ -141,16 +141,16 @@
 int16 VideoPlugin::handleEvent(const ANPEvent* evt) {
     switch (evt->eventType) {
         case kDraw_ANPEventType:
-            gLogI.log(inst(), kError_ANPLogType, " ------ %p the plugin did not request draw events", inst());
+            gLogI.log(kError_ANPLogType, " ------ %p the plugin did not request draw events", inst());
             break;
         case kTouch_ANPEventType:
             if (kDown_ANPTouchAction == evt->data.touch.action) {
-                gLogI.log(inst(), kDebug_ANPLogType, " ------ %p requesting fullscreen mode", inst());
+                gLogI.log(kDebug_ANPLogType, " ------ %p requesting fullscreen mode", inst());
                 gWindowI.requestFullScreen(inst());
             }
             return 1;
         case kKey_ANPEventType:
-            gLogI.log(inst(), kError_ANPLogType, " ------ %p the plugin did not request key events", inst());
+            gLogI.log(kError_ANPLogType, " ------ %p the plugin did not request key events", inst());
             break;
         default:
             break;