How to write a message to the Event Log

This tiny helper function creates the entry and closes it. The "source" argument is the name of your application

static void
writeEntry_EventLog(Args _args)

{

    System.Diagnostics.EventLog oEV = new
System.Diagnostics.EventLog();

    ;

   oEV.set_Source(‘Dynamics AX’);

    oEV.WriteEntry("This is just an
information from Dynamics AX");

    oEV.Close();

}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: