I am developing a channel plugin for www.memocast.com. I want to print some debug information, and I see from other code examples that they use a Log statement, like
Log(“This is a log”)
and I assuem that this prints the log text to the Plex log file.
But whenever I try to use it in my code, I always get error. What am I doing wrong?
That should work fine. What’s the error? 
When I add the Log statement, and move the bundle to Plug-ins folder:
Dec 28, 2011 22:30:53 [0xb3a65000] DEBUG - Starting plug-in /Users/imyrvold/Library/Application Support/Plex Media Server/Plug-ins/Memocast.bundle.
Dec 28, 2011 22:30:53 [0xb3a65000] DEBUG - Removing directory for site configurations: /Users/imyrvold/Library/Application Support/Plex Media Server/Plug-ins/Memocast.bundle/Contents/Site Configurations
Dec 28, 2011 22:30:53 [0xb3a65000] DEBUG - Starting file watcher for com.plexapp.plugins.memocast
Dec 28, 2011 22:30:53 [0xb3a65000] DEBUG - Spawned plug-in com.plexapp.plugins.memocast with PID 7155
Dec 28, 2011 22:30:53 [0xb3a65000] DEBUG - [com.plexapp.plugins.memocast] Sent command: GET /:/prefixes
Dec 28, 2011 22:30:54 [0xb0cb1000] DEBUG - Request: GET /system/messaging/clear_events/com.plexapp.plugins.memocast [127.0.0.1] (2 live)
Dec 28, 2011 22:30:54 [0xb0cb1000] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/messaging/clear_events/com.plexapp.plugins.memocast
Dec 28, 2011 22:30:54 [0xb0cb1000] DEBUG - HTTP request to: http://127.0.0.1:57368/system/messaging/clear_events/com.plexapp.plugins.memocast
Dec 28, 2011 22:30:54 [0xb3a65000] ERROR - Error reading from plug-in [com.plexapp.plugins.memocast], we’re killing it (got: ‘’).
Dec 28, 2011 22:30:54 [0xb3a65000] DEBUG - Stopping [com.plexapp.plugins.memocast].
Dec 28, 2011 22:30:54 [0xb3a65000] DEBUG - [com.plexapp.plugins.memocast] Killing.
Dec 28, 2011 22:30:54 [0xb3a65000] ERROR - Error received reading configuration for com.plexapp.plugins.memocast
Dec 28, 2011 22:30:54 [0xb3a65000] DEBUG - Stopping [com.plexapp.plugins.memocast].
When I remove the Log line:
Dec 28, 2011 22:33:04 [0xb3beb000] DEBUG - File /Users/imyrvold/Library/Application Support/Plex Media Server/Plug-ins/Memocast.bundle/Contents/Code changed: 1325107847 => 1325107983.
Dec 28, 2011 22:33:04 [0xb3beb000] DEBUG - File /Users/imyrvold/Library/Application Support/Plex Media Server/Plug-ins/Memocast.bundle/Contents/Code/init.py changed: 1325107847 => 1325107983.
Dec 28, 2011 22:33:04 [0xb3beb000] DEBUG - Changed: /Users/imyrvold/Library/Application Support/Plex Media Server/Plug-ins/Memocast.bundle/Contents/Code
Dec 28, 2011 22:33:04 [0xb3beb000] DEBUG - Changed: /Users/imyrvold/Library/Application Support/Plex Media Server/Plug-ins/Memocast.bundle/Contents/Code/init.py
What does the plug-in’s log file say? It sounds like a syntax error - that’s the only thing that would prevent the plug-in starting at all.
Oh, I didn’t know the plug-in had it’s own logfile. It became evident what was wrong once I had a look there. It was simple an indentation error. i have never used python before, so that was a new experience.
Now I got one step further creating the plugin 
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.