File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public class HttpLogger : Logger
23
23
private readonly string applicationName ;
24
24
private static readonly HttpClient client = new HttpClient ();
25
25
26
- // Will be used to pass values into base class .
26
+ // Will be used to pass values into next constructor .
27
27
public HttpLogger (string applicationName , string loggerName )
28
28
: this (applicationName , loggerName , baseAddress : " http://localhost:5000/" )
29
29
{ }
@@ -47,13 +47,13 @@ public class HttpLogger : Logger
47
47
// At this point the logMessage is already populated and you can change it before sending.
48
48
public override void OnExecutor (string level , IDictionary <string , object > logMessage )
49
49
{
50
- // setup
51
- var requestBody = JsonConvert .SerializeObject (logMessage );
52
- var content = new StringContent (content : requestBody , Encoding .UTF8 , mediaType : " application/json" );
53
-
54
50
// some message manipulation
55
51
logMessage [" EndPoint" ] = $" {baseAddress }/logging" ;
56
52
logMessage [" LogType" ] = nameof (HttpLogger );
53
+
54
+ // setup
55
+ var requestBody = JsonConvert .SerializeObject (logMessage );
56
+ var content = new StringContent (content : requestBody , Encoding .UTF8 , mediaType : " application/json" );
57
57
58
58
// send
59
59
client .PostAsync (" /loggingServe" , content ).GetAwaiter ().GetResult ();
You can’t perform that action at this time.
0 commit comments