diff --git a/package/android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessorPluginRegistry.java b/package/android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessorPluginRegistry.java index 5dd974d..11a3525 100644 --- a/package/android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessorPluginRegistry.java +++ b/package/android/src/main/java/com/mrousavy/camera/frameprocessor/FrameProcessorPluginRegistry.java @@ -1,5 +1,6 @@ package com.mrousavy.camera.frameprocessor; +import android.util.Log; import androidx.annotation.Keep; import androidx.annotation.Nullable; import com.facebook.proguard.annotations.DoNotStrip; @@ -10,6 +11,7 @@ import java.util.HashMap; @Keep public class FrameProcessorPluginRegistry { private static final Map Plugins = new HashMap<>(); + private static final String TAG = "FrameProcessorPluginRegistry"; @DoNotStrip @Keep @@ -17,15 +19,19 @@ public class FrameProcessorPluginRegistry { assert !Plugins.containsKey(name) : "Tried to add a Frame Processor Plugin with a name that already exists! " + "Either choose unique names, or remove the unused plugin. Name: " + name; Plugins.put(name, pluginInitializer); + Log.i(TAG, "Successfully registered Frame Processor Plugin \"" + name + "\"!"); } @DoNotStrip @Keep public static FrameProcessorPlugin getPlugin(String name, Map options) { + Log.i(TAG, "Looking up Frame Processor Plugin \"" + name + "\"..."); PluginInitializer initializer = Plugins.get(name); if (initializer == null) { + Log.i(TAG, "Frame Processor Plugin \"" + name + "\" does not exist!"); return null; } + Log.i(TAG, "Frame Processor Plugin \"" + name + "\" found! Initializing..."); return initializer.initializePlugin(options); } diff --git a/package/ios/Frame Processor/FrameProcessorPluginRegistry.m b/package/ios/Frame Processor/FrameProcessorPluginRegistry.m index 3268258..da6fb2d 100644 --- a/package/ios/Frame Processor/FrameProcessorPluginRegistry.m +++ b/package/ios/Frame Processor/FrameProcessorPluginRegistry.m @@ -28,14 +28,18 @@ name); [[FrameProcessorPluginRegistry frameProcessorPlugins] setValue:pluginInitializer forKey:name]; + NSLog(@"Successfully registered Frame Processor Plugin \"%@\"!", name); } + (FrameProcessorPlugin*)getPlugin:(NSString* _Nonnull)name withOptions:(NSDictionary* _Nullable)options { + NSLog(@"Looking up Frame Processor Plugin \"%@\"...", name); PluginInitializerFunction initializer = [[FrameProcessorPluginRegistry frameProcessorPlugins] objectForKey:name]; if (initializer == nil) { + NSLog(@"Frame Processor Plugin \"%@\" does not exist!", name); return nil; } + NSLog(@"Frame Processor Plugin \"%@\" found! Initializing...", name); return initializer(options); }