Getting Started Creating Log Messages Using the API – Visual Basic

COM Interface Reference, Samples

Logging from Visual Basic code requires three simple steps:

1)Register Paul Bunyan’s type library with the Visual Basic IDE. Click on the Project | References... menu item to display the References dialog and enable the Paul Bunyan logging objects.

2)Declare a PBLogger object in your code using the Dim statement.

3)Add logging calls as desired.


Private Sub Ok_Click()
'Declare logger object
Dim lgr As New PBLogger

'Log a message
lgr.Log "WARNING", "Some warning..."
End Sub