@@ -45,7 +45,7 @@ public static string AsReadableString(this IDictionary<string, object> logMessag
45
45
{
46
46
var indent = GetIndent ( key : pair . Key , maxLength ) ;
47
47
var message = $ "{ pair . Value } ". Replace ( Environment . NewLine , string . Empty ) ;
48
- log . Append ( indent ) . Append ( pair . Key ) . Append ( ": " ) . AppendLine ( message ) ;
48
+ log . Append ( " " ) . Append ( pair . Key ) . Append ( indent ) . Append ( ": " ) . AppendLine ( message ) ;
49
49
}
50
50
51
51
// exception handler
@@ -100,20 +100,18 @@ private static void AppendDefaults(IDictionary<string, object> logMessage, int m
100
100
private static void AppendKey ( IDictionary < string , object > logMessage , int maxLength , string key , StringBuilder log )
101
101
{
102
102
log
103
- . Append ( GetIndent ( key , maxLength ) )
103
+ . Append ( " " )
104
104
. Append ( key )
105
+ . Append ( GetIndent ( key , maxLength ) )
105
106
. Append ( ": " )
106
107
. Append ( logMessage [ key ] )
107
108
. AppendLine ( ) ;
108
109
}
109
110
110
111
private static string GetIndent ( string key , int maxLength )
111
112
{
112
- // constants
113
- const int Indent = 4 ;
114
-
115
113
// get indent for entry
116
- var indent = maxLength - key . Length + Indent ;
114
+ var indent = maxLength - key . Length ;
117
115
118
116
// results
119
117
return new string ( ' ' , indent ) ;
@@ -126,7 +124,6 @@ private static StringBuilder AppendExceptionEntry(IDictionary<string, object> lo
126
124
. AppendLine ( "- Exception(s) -" )
127
125
. AppendLine ( "----------------" )
128
126
. Append ( logMessage [ "Exception" ] ) . AppendLine ( ) ;
129
-
130
127
}
131
128
}
132
129
}
0 commit comments