Skip to content

Commit

Permalink
Include warnings in log file
Browse files Browse the repository at this point in the history
Thanks, @ollypsilon for identifying this oversight! #385
  • Loading branch information
joyfullservice committed Mar 14, 2023
1 parent 6645a08 commit 59dfb11
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Version Control.accda.src/modules/clsLog.cls
Original file line number Diff line number Diff line change
Expand Up @@ -188,18 +188,16 @@ Public Sub Error(eLevel As eErrorLevel, strDescription As String, Optional strSo
strDisplay = strPrefix & strDescription
End If

' Display on the output screen anything higher than a warning
If eLevel > eelWarning Then
Me.Add vbNullString
Me.Spacer
Me.Add strDisplay, , , "red"
Me.Spacer
End If
' Log all errors, and display on the output screen anything higher than a warning
Me.Add vbNullString, (eLevel > eelWarning)
Me.Spacer (eLevel > eelWarning)
Me.Add strDisplay, (eLevel > eelWarning), , "red"

' Log the full detail to the log file
' Log the additional error and source details to the log file
If Err Then .Add "Error ", Err.Number, ": ", Err.Description, " "
If strSource <> vbNullString Then .Add "Source: ", strSource
Me.Add .GetStr, False
Me.Spacer (eLevel > eelWarning)

' See if we are actively logging an operation
If Log.Active Then
Expand Down

0 comments on commit 59dfb11

Please sign in to comment.