diff --git a/Modules.Logging/LogConfig.vb b/Modules.Logging/LogConfig.vb index be543648..e4c88a26 100644 --- a/Modules.Logging/LogConfig.vb +++ b/Modules.Logging/LogConfig.vb @@ -288,7 +288,7 @@ Public Class LogConfig ''' The fully qualified class name ''' This method is very resource-intensive! - Public Shared Function GetClassFullName(Optional IncludeMethodNames As Boolean = False) As String + Public Shared Function GetClassFullName(Optional IncludeMethodNames As Boolean = False, Optional Parts As Integer = 0) As String Dim oFramesToSkip As Integer = 2 Dim oClassName As String = String.Empty Dim oStackTrace = Environment.StackTrace @@ -316,6 +316,16 @@ Public Class LogConfig End If Next + If Parts > 0 Then + Dim oParts = oClassName. + Split("."). + Reverse(). + Take(Parts). + Reverse() + + oClassName = String.Join(".", oParts) + End If + Return oClassName End Function