DbgLog.LoggingLevel
This property is called to Get/Set the logging level.
Syntax | Parameters | Return Value |
---|---|---|
- | - | LogLevel |
SVB Example
Logging messages and reviewing the debug log:
Sub Main 'Enable debug logging at the highest level Application.DebugLogEnable = True Set myLog = Application.DebugLog myLog.LoggingLevel = scLogEverything 'Show the log report window Application.DebugReport(scLogEverything).Visible = True 'Log an informational message. Note that specifying 0 as thread ID will 'imply the main thread in the log report. myLog.LogEntry(Application.ProcessID, 0, scLogLevelInformational, "Opening the dataset") Dim spr As Spreadsheet Set spr = Spreadsheets.Open(Path & "\Examples\Datasets\Cat Clinic.sta") 'Iterate through the data before the analysis and log any major issues with the data Dim i As Long For i = 1 To spr.NumberOfCases If spr.Value(i, 9) > 20 Then myLog.LogEntry(Application.ProcessID, 0, scLogLevelCritical, _ "Case " & spr.CaseName(i) & ": Extremely overweight (" & Trim(Str(spr.Value(i, 9))) & "), review required.") End If Next 'Create a histogram myLog.LogEntry(Application.ProcessID, 0, scLogLevelInformational, "Creating the histogram") Dim histogram As Analysis Set histogram = Analysis(sc2dHistograms, spr) '2D Histograms Dim oGD As Histogram2D Set oGD = histogram.Dialog oGD.Variables = "9 " histogram.RouteOutput(oGD.Graphs).Visible = True spr.Close End Sub
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.