Some content on this site is available only to logged-in subscribers. Contact Us for information on becoming a subscriber.

InSource.Solutions | InSource Training | InSource Client Portal
InSource Solutions Logo
Log In Sign Up
InSource.Solutions InSource Training InSource Client Portal Log In Sign Up
  • Home
  • AVEVA Application Server
  • AVEVA Application Server Documentation

TN AppSvr152 Using the LogCustom() Function in Application Server

Last updated: March 9th, 2025

Description

  • Author: Brian Schneider
  • Published: March 9th, 2025

Details:

Description

This article from InSource details the usage of the LogCustom() function. The Wonderware Application Server LogCustom() built in script function writes a user-defined custom flag message in the log viewer. 

  • Author: Brian Schneider
  • Published: 09/25/2015
  • Applies to: Wonderware System Platform 2014 and later

Details

Syntax
LogCustom( CustomFlag, msg );

Parameter(s)
CustomFlag
Creates a new log flag based on the first parameter string. The first call creates the custom flag.
msg
The message to write to the Log Viewer. Actual string or a string attribute.

Remarks
The log flag is disabled by default. 
The message is always logged under the component "ObjectName.ScriptName". For example, "WinPlatform_001.script1: msg", which identifies what object and what script within the object logged the error. 
LogCustom() is similar to LogMessage(), but displays the message in the custom log flag when Log Custom is enabled.
The parameter help tooltip and Function Browser sample parameter list will show "LogCustom( CustomFlag, msg )" rather than "LogCustom( CustomFlag, Message )". "Message" is a reserved keyword.

Example
LogCustom(EditBox1.text, "User-defined message.");

This statement writes to the Log Viewer as follows: 
10/24/2005 12:49:14 PM ScriptRuntime <ObjectName.ScriptName>: <LogFlag EditBox1> User-defined message.

custom logging app server
Give feedback about this article

Recommended articles

TN 1242 Aveva Historian Storage Locations and Best Practices

Read More
Support Icon

CONTACT SUPPORT

How to reach us

10800 Midlothian Turnpike Tpke, Suite 209, Richmond, VA 23235

1.877.INSOURCE

Technical Support - 1.888.691.3858

Contact Us

  • InSource Solutions
  • InSource Training
  • InSource Client Portal
  • Log In
InSource Solutions Logo

© 2025 InSource Solutions. All Rights Reserved.

Knowledge Base Software powered by Helpjuice

Expand