7.0

Table Of Contents
Example
This example results in expanding the string of variables to “2005-02-17<cr><lf>” where <cr><lf> is a
carriage return followed by a line feed.
str = Watch.ExpandString("%y-%m-%d\n")
12.4.11 Watch.Log
Creates messages that are added to the PlanetPress Suite Workflow Tools watch.log file. The PlanetPress Suite
Workflow Tools watch.log file is located in ...\Program Files\PlanetPress Suite 7\PlanetPress
Watch\Log\ppw[log date].log.
View error messages in the Services Console while PlanetPress Suite Workflow Tools is in Run mode by
choosing Tools | Services | Service Console. In the Service Console, error messages appear with colors
that correspond to the message level.
Level Type Text Color in Service Console
1 Error Red
2 Warning Orange
3 Information Black
4 Debug Grey
Syntax
Watch.Log(“Message”, Level)
Arguments
Message—A string representing the message that is logged in the log file. Note that the text of the message
must use the locale encoding of the system where the PlanetPress Suite software will be running, otherwise it
will be unreadable.
Level—An integer between 1 and 4, specifying the severity level of the error message. Set message levels as
follows:
Level Description
1 The message is logged as an Error in the log file.
2 The message is logged as a Warning in the log file.
3 The message is logged as Information in the log file.
4 The message only appears when the application runs in Debug mode.
Example
Watch.Log “The current job file is “ & Watch.GetJobFileName, 3
Using Scripts - Using Dot Notation
Objectif Lune Inc. © 2009 237