small fixes

This commit is contained in:
Jonathan Jenne
2019-02-27 11:52:44 +01:00
parent 3d64eb6eef
commit 667b8f1b2f
5 changed files with 18 additions and 16 deletions

View File

@@ -18,11 +18,16 @@ Public Class BaseForm
Protected ReadOnly _ErrorHandler As ClassErrorHandler
Public Sub New()
Dim oClassName = [GetType]().Name
' Get the full name of the inheriting form
' so the log messages have the right classname
Dim oClassName = [GetType]().FullName
' My.LogConfig is undefined in the designer
' so we need to check with ?
' My.LogConfig is undefined in the designer
_Logger = My.LogConfig?.GetLogger(oClassName)
_ErrorHandler = New ClassErrorHandler(_Logger)
' When you add something, be careful if it
' depends on a global var like My.LogConfig
' you might need to check for its existence with ?
End Sub
End Class