-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathLogStats.vb
More file actions
27 lines (23 loc) · 793 Bytes
/
LogStats.vb
File metadata and controls
27 lines (23 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Imports System.Diagnostics
Imports System.IO
Imports JJLogLib
Imports JJTrace
Friend Class LogStats
Private Const noLog As String = "There is no active log file."
Friend Function ShowLogStats() As Boolean
If (ContactLog Is Nothing) OrElse (ContactLog.Name = vbNullString) OrElse (Not File.Exists(ContactLog.Name)) Then
MsgBox(noLog)
Return False
End If
Dim session = New LogSession(ContactLog)
If Not session.Start() Then
Tracing.TraceLine("ShowLogStats couldn't start session", TraceLevel.Error)
Return False
End If
If (session.ShowStats IsNot Nothing) Then
session.ShowStats()
End If
session.EndSession()
Return True
End Function
End Class