Library for managing logs in Elipse E3/Power. Allows displaying messages in a console window, storing them internally, and exporting to a text file.
- Add the
consolelog.liblibrary to your domain. - Instantiate the
Console Log EnginexObject in aDataServerwithin any project (.prj) in the domain. - Instantiate the
Immediate windowxControl on a screen and link its.Consoleproperty to the previously created xObject, for example:Data.consolelog_Engine1
To write a message to the console, use the .WriteLine property of the ConsoleLog xObject:
Sub ExampleMessage()
Dim consoleLog
Set consoleLog = Application.GetObject("Data.consolelog_Engine1")
consoleLog.WriteLine = "Starting verification process..."
End SubOr create a helper function for simpler usage:
Sub WriteLog(ByVal message)
Dim consoleLog
Set consoleLog = Application.GetObject("Data.ConsoleLog1")
consoleLog.WriteLine = message
End Sub
Sub ProcessData()
WriteLog "Processing started"
' processing code...
WriteLog "Processing completed successfully"
End Sub