Global Objects | Format | WriteToLog Function

關閉描述

Writes a custom string to the BarTender log file.

關閉語法

Format.WriteToLog(Message)

Where Message is a string containing the text of the log entry.

關閉備註

The Format.WriteToLog function enables you to add customized entries to the BarTender log file.The following example demonstrates the Format.WriteToLog function in use.The code checks the number of serialized items.If the number of serialized items is greater than 1000, BarTender will display a prompt that informs the user that there are too many print items.It will also write an entry to the print job log file.

If Format.NumberSerializedLabels > 1000 Then

Format.CancelPrinting("Too Many Labels.Job is being canceled.", "")

Format.WriteToLog("Print Job Canceled for" & Format.Filename)

End If