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 Tech Notes

TN AppSvr205 Application Server and Windows Event Log Scripting

Last updated: February 28th, 2025

Description

  • Author: Brian Schneider
  • Published: February 28th, 2025

Details:

Description

This article from InSource shows how to write a script to read the Windows Event Log. This can be useful if searching for an error and wanting to generate an alarm or notification to someone to take action.

  • Author: Lewis Talley
  • Published: 09/01/2016
  • Applies to: Application Server (Various)

Details

In the declarations section of the object type or paste the following text;

dim myLog as System.Diagnostics.EventLog;
dim entry as System.Diagnostics.EventLogEntry;

Create an attribute to trigger the script to run.

The body of the script is a follows (make sure to mark this script as asynchronous)

myLog = new System.Diagnostics.EventLog();
myLog.Source= "Application";
for each entry in myLog.Entries
logmessage (entry.Message);
if entry.EntryType == "Error" then
logmessage ("Error**************** " + entry.Message);
endif;
Next;
LogMessage ("**************************************" + entry.MachineName);
Me.Readlog = False;

 

application server event log
Give feedback about this article

Recommended articles

How to Check for On Hold Emails in Mimecast

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