Interfaces: Improve logging in PropertyValues
This commit is contained in:
parent
19424e6adf
commit
2a5e8b9186
@ -146,7 +146,7 @@ Public Class PropertyValues
|
||||
Try
|
||||
oPropertyValueList = GetPropValue(Document, oItem.Key)
|
||||
Catch ex As Exception
|
||||
_logger.Warn($"{MessageId} # Unknown error occurred while fetching specification {0} in group {1}:", oTableColumn, oItem.Value.GroupScope)
|
||||
_logger.Warn("{2} # Unknown error occurred while fetching specification [{0}] in group [{1}]:", oTableColumn, oItem.Value.GroupScope, MessageId)
|
||||
_logger.Error(ex)
|
||||
oPropertyValueList = New List(Of Object)
|
||||
End Try
|
||||
@ -177,11 +177,11 @@ Public Class PropertyValues
|
||||
|
||||
If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) Then
|
||||
If oItem.Value.IsRequired Then
|
||||
_logger.Warn($"{MessageId} # Specification [{oTableColumn}] is empty, but marked as required! Skipping.")
|
||||
_logger.Warn("{0} # Specification [{1}] is empty, but marked as required! Skipping.", MessageId, oTableColumn)
|
||||
oResult.MissingProperties.Add(oTableColumn)
|
||||
Continue For
|
||||
Else
|
||||
_logger.Debug($"{MessageId} # oPropertyValue for specification [{oTableColumn}] is empty or not found. Skipping.")
|
||||
_logger.Debug("{0} # oPropertyValue for specification [{1}] is empty or not found. Skipping.", MessageId, oTableColumn)
|
||||
|
||||
Continue For
|
||||
End If
|
||||
@ -208,7 +208,6 @@ Public Class PropertyValues
|
||||
Return New List(Of Object)
|
||||
End If
|
||||
|
||||
|
||||
If oNameParts.Length = 1 Then
|
||||
Dim oPropInfo As PropertyInfo = Obj.GetType().GetProperty(PropertyName)
|
||||
|
||||
@ -235,7 +234,7 @@ Public Class PropertyValues
|
||||
Dim oInfo As PropertyInfo = oType.GetProperty(oPartName)
|
||||
|
||||
If IsNothing(oInfo) OrElse IsNothing(oInfo.GetValue(Obj, Nothing)) Then
|
||||
_logger.Debug("Property {0} does not exist(2).", oPartName)
|
||||
_logger.Debug("Property [{0}] does not exist(2).", oPartName)
|
||||
Return New List(Of Object)
|
||||
End If
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user