LOG EVENT

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 6.5


LOG EVENT (message{; importance})

ParameterTypeDescription
messageStringContents of the message
importanceIntegerMessage's importance level

Note: This feature is only available on Windows.

Description

The LOG EVENT command allows you to add custom messages that will appear in the Windows Log events. This service maintains a log file that receives and stores messages coming from running applications. It therefore allows you to monitor the course of a worksession. For more information, please refer to the 4D Design Mode manual.

For this feature to be available, Windows Log events service must be running.

Pass the message to write in the log events in message.

You can attribute a level of importance to message, which helps you to read and understand the log events. There are three levels of importance: Information, Warning, and Error. The importance parameter allows you to set the level of importance of the message.

4th Dimension provides you with the following predefined constants, placed in the "Windows Log Events" category:

ConstantTypeValue
Information MessageInteger0
Warning MessageInteger1
Error MessageInteger2

If you don't pass anything in importance or pass an incorrect value, the default value (0) is used.

Example

If you want to have keep track of when your database is opened, you could write the following line of code in the On Startup Database Method:

   LOG EVENT ("The Invoice database was opened.")

Each time the database is opened, this information will be written in Windows' log events and its level of importance will be 0.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next