Script.LogConsole(Log)

Script.LogConsole(Log) writes the provided text string to the Deacom console log. Script.LogConsole() only works when the user is connected to Deacom through the web server console. This is a new method to help developers test their scripts by outputting data to the web console application.

Notes:

  • This method will not work on the web server service.

  • Please be sure to remove or comment out any Script.LogConsole() entries before publishing to a production environment. While this function will not run on a web service, there is still a small performance hit to check if you are running on a console or service.

Applies To

Properties and Methods

None

Available

The .LogConsole(Log) method is available in:

  • 17.00.001
  • All newer builds

Type

Method

Syntax

Script.LogConsole(Log);

Parameters

Parameter

Required

Description

Log

Yes

Text to print to the console log screen. Can be any combination of text, variables, properties, methods or functions that return values

Example

//--Script can be placed on any event. Creating a custom button with a click event is the easiest

Script.LogConsole("Testing\n1\n2\n3\n4\n5");

Script.LogConsole(DateTime.Now.ShortDateString);

Script.LogConsole(DateTime.Now.LongTimeString);

Script.LogConsole(DateTime.Now.Day);

Script.LogConsole(null);

/* Expected output in the console log:

[01:52 PM] Script.LogConsole: Testing

1

2

3

4

5

[01:52 PM] Script.LogConsole: 01/06/2022

[01:52 PM] Script.LogConsole: 13:52:26

[01:52 PM] Script.LogConsole: 6

[01:52 PM] Script.LogConsole: null

*/

Keyword Link IconScript Object - Properties and Methods