Jobs:/ZUGFeRD: Improve logging for Check_FileSize
This commit is contained in:
parent
c0960081f2
commit
9168474530
@ -766,14 +766,21 @@ Public Class ImportZUGFeRDFiles
|
||||
''' <param name="pMaxFileSizeInMegaBytes"></param>
|
||||
''' <returns></returns>
|
||||
Private Function Check_FileSize(pFileInfo As FileInfo, pMaxFileSizeInMegaBytes As Integer) As Boolean
|
||||
_logger.Debug("Checking Filesize of {0}", pFileInfo.Name)
|
||||
|
||||
If pMaxFileSizeInMegaBytes <= 0 Then
|
||||
_logger.Debug("Filesize is not configured. Skipping check.")
|
||||
Return True
|
||||
End If
|
||||
|
||||
Dim oMaxSize = pMaxFileSizeInMegaBytes * 1024 * 1024
|
||||
|
||||
_logger.Debug("Filesize threshold is {0} bytes.", oMaxSize)
|
||||
If oMaxSize > 0 And pFileInfo.Length > oMaxSize Then
|
||||
_logger.Debug("Filesize is bigger than threshold. Rejecting.")
|
||||
Return False
|
||||
Else
|
||||
_logger.Debug("Filesize is smaller than threshold. All fine.")
|
||||
Return True
|
||||
End If
|
||||
End Function
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user