Debugging Preview Generation

Debugging preview generation is helpful in following scenarios:

  1. Preview of some file or specific format is not available.
  2. Preview generation by some media convertor/custom convertor is not working.
  3. Debugging some new media convertor.
  4. Generated preview is not correct. For E.g color mismatch, low quality etc…

View Zoom Preview Server Log

Zoom Preview server log can be referred in following cases:
  1. When preview generation is taking long time and no preview is available.
  2. If some bug has occurred in Zoom Preview server or when it is running on low resources. Like low memory, preview server cleanup issues, low disk space.
  3. If Zoom Preview server is not reachable and not responding to queries in Visual Approval and Web Asset Browser.
  4. In any other case when Preview server is not behaving properly.
Steps to view preview server log:
  1. Goto logs directory inside Zoom Preview server installation directory.
    1. On windows: “C:\Program Files (x86)\Evolphin\DAM\logs”
    2. On Mac: “/Applications/Evolphin/zoom/Resources/logs”
    3. On Linux/Unix machine: Goto to Zoom or Preview server installation directory and then in logs directory.
  2. Open file preview_log.0 in your favorite editor. This file contains all the data related to Preview server logging.
    1. When preview_log.0 file reached to specific size threshold, it gets renamed to preview_logs.1 and new preview_logs.0 is created and so on.
  3. Changing log level: By default log level is set to INFO. In this log level, basic information is printed along with exceptions and errors. You can change log level to something else for more detailed logging.
  4. To change log level goto conf directory of Zoom installation. Open and edit
    1. Change the value of .level=INFO to .level=FINE and java.util.logging.FileHandler.level = INFO to java.util.logging.FileHandler.level = FINE
    2. Restart preview server for the changes to take effect.
      Changing log level have impact in preview server performance and may produce large amount of logging data.

Enable and View Preview Process Log

Zoom Preview server starts an external process to create preview of each file/asset. It is possible the enable the logging of preview process output to some log file. This log file can be evaluated to see the errors in preview generation or just for more information on preview generation process. This log file contains output of different processes like ffmpeg, convert, ghostscript. These tools are used by Zoom Preview server for preview generation.

Steps to enable the preview process logging:
  1. Open and edit preview-server.xml file. This file can be found in <Zoom Installation>/conf directory.
    1. On windows: “C:\Program Files (x86)\Evolphin\DAM\conf”
    2. On Mac: “/Applications/Evolphin/zoom/Resources/conf”
    3. On Linux/Unix machine: Goto to Zoom or Preview server installation directory.
  2. Edit the preview-server.xml in any text editor, like notepad on windows, vim, emac, nano on linux and textedit on mac.
  3. Find line:  <enableThumbnailProcessLogging>false</enableThumbnailProcessLogging> and change false to true like
  4. Save the file.
    While doing this please take care that file permission is not messed up. And Zoom Preview server is still be able to read and write the file.
  5. Restart Zoom Preview server.
Viewing preview process log file:
  1. Find out the Zoom Preview server process id, goto preview server log file in logs directory of Zoom Preview Installation.
  2. Open file preview_log.0 from logs directory. Go to the end of this file, when preview server was last started. Lookup for text similar to: Process info: 5180@green.localIn this text 5180@green.local is the Zoom Preview server process id with machine name, for you it must be something different. Note it down or remember it.
  3. Goto home directory of user from which Zoom Preview server is running. For e.g. If Zoom Preview server is running with user root, then home directory would be /var/root else if Zoom Preview server is running with different user account then goto /home/<ZoomPreviewUser>.
  4. In the home directory go to .zm/logs directory.
  5. In the logs directory, go inside the directory which matches to name thumbs_<process info>. For e.g. .zm/logs/thumbs_5180@green.local. For you, value of 5180@green.local would be different. It would be the value which you have noted in above step 2.
    Now you would be in directory like: <Zoom Preview user’s home>/.zm/logs/thumbs_<process_info>
  6. Inside this directory a log file with name thumbnail_process.log.0 is present. Whenever a new preview generation is triggered, output of its generation is appended to this logfile.
    Log file path: <Zoom Preview user’s home>/.zm/logs/thumbs_<process_info>/thumbnail_process.log.0

Testing on command line

The  ImageMagick shipped with Zoom can be executed on the command line to debug the convert process. In order to do that please set the following environment variables:

Linux (using bash/sh)

$export ZOOM_INSTALL_DIR=/home/evolphin/zoom
$export LD_LIBRARY_PATH=$ZOOM_INSTALL_DIR/lib/imagemagick

Windows (PowerShell)

Should not need the environment variable ZOOM_INSTALL_DIR to be set. Please check by listing the current environment variables:

> Get-ChildItem Env:

If convert.exe does not work from the PowerShell, please try to set:

>setx ZOOM_INSTALL_DIR "C:\Program Files (x86)\Evolphin\DAM"

Leave a Comment