In creating my plugin, I created a service and I'm trying to figure out how I can add some logging to it.
If I use the Log(message) in the service like I use in the __init__.py file, it (seemly) throws an exception and exits early. I'm guessing there is a different way that I need to do this, or maybe there is a way to actually run it through in a debug mode?
though I suppose you mean you already do that. Log.Info(message), or similar, not just Log(message). Well, in fact, maybe even Log(message) is correct. I didn’t new using one of the methods is not mandatory. Anyway you could try with one of the methods, Info, Debug, …
Maybe it is useful too to show here what the exception looks like.
The URLService for Youtube included with Plex uses Log without any problem and without importing anything to use that function. The file is located in Windows inside your plex installation in folder \Resources\Plug-ins\Services.bundle\Contents\Service Sets\com.plexapp.plugins.youtube\URL\YouTube\ServiceCode.pys
Thanks for the link to the docs, meant to look a bit closer at the Log module. Using just Log(message) seems to work fine in the __init__ works fine, I was wanting to see if you could change the log level as well.
I'll try it again tonight, maybe something else I was doing wrong was incorrect. Otherwise, maybe it gets put into a different log file than what is defined in Info.plist?