Safely calling other plugin code from a different plugin I have a Craft Plugin that is a logging library I want to use in other plugins I develop, but I don't want it to be a dependancy in these other plugins. Is there a nice, space efficient way in Craft to do something like below? I don't want to have to wrap every call in an if statement:

# If WatchTower isn't installed... don't explode please!!!
@craft()-&gt;watchTowerDB-&gt;log($params)


My plugin seems to stop processing and redirect to the current page if it isn't installed. Thanks!
You could write a wrapper log method that's abstracts the check away so you only have to do it once.  The update your code to use the wrapper.

That method could just use craft()-&gt;plugins-&gt;getPlugin('pluginHandle') to see if the target plugin is installed and enabled.  Craft will auto-load the plugin's services, so you don't need to check specifically for them.