Logging

If you wish to use logging for your transactions, the following subroutine describes how you can set it up:

  1. Create the logging object.

  2. Set the log file if you have a requirement for debugging.

  3. Set the logging level, where 7 is the most verbose.

  4. Set the flags for message formatting options.

  5. Write a message into the log file.

    Public Sub Set_Logging()
    Set alog = CreateObject("Log.java.1")
    alog def.setOutputFile ("C:\temp\activelinc.log")
    alog def.setLogLevel (7)
    alog def.setFlags (30)
    alog.def.log("Module Name", log_level, "Message")
    End Sub

To use logging, include the following line to the main subroutine that loads the forms, and handles the connection and transaction processing, before you create the LINCEnvironment object:

Set_Logging