Creating a scanner - logging messages - windows

I am trying to create a simple scanner and I have used the default TV Series scanner as a starting template, basically stripping most of the code out.

 

In there it has a few print statements such as

 

 print "Hello, world!"

 

Can you see this output anywhere?

 

Also the docs refer to a Log.Debug, Log.Info etc

 

If I try to use this method I get an exception in the main scanner log.

 

Jan 15, 2014 10:09:09:279 [1412] ERROR - Error in Python: Running scanner:
Traceback (most recent call last):
  File "C:\Users\ccrowe.AP\AppData\Local\Plex Media Server\Plug-ins\Scanners.bundle\Contents\Resources\Series\Chris Training Scanner.py", line 22, in Scan
    Log.Debug( "Found File : %s" % file)
NameError: global name 'Log' is not defined
 
What do I need to do to reference this Log method?
 
Chris
 

The Scanner doesn't run in the Framework, so "Log()" and other Framework functions won't work there.

You can run the scanner executable at the command line and use normal "print" statements to debug.

Thanks - just what I needed...

Chris

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.