Skip to content

Commit

Permalink
Added logging so that it's obvious when processing traffic
Browse files Browse the repository at this point in the history
  • Loading branch information
wshaddix committed Feb 20, 2018
1 parent da7e471 commit 9a0bda6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@

**1.0.0**

* added pipeline feature and refactored the solution to have working examples of logging, metrics, authentiation and trace header injection.
* added pipeline feature and refactored the solution to have working examples of logging, metrics, authentiation and trace header injection.

**1.0.1**

* added logging to the request handler so that it's obvious when traffic is coming into the http-nats-proxy
3 changes: 3 additions & 0 deletions src/Proxy/RequestHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public async Task HandleAsync(HttpContext context)
// create a NATS subject from the request method and path
message.Subject = ExtractSubject(context.Request.Method, context.Request.Path.Value);

// emit a log message
Console.WriteLine($"Routing {string.Join(context.Request.Method, "", context.Request.Path.Value)} to {message.Subject}");

// parse the request headers, cookies, query params and body and put them on the message
ParseHttpRequest(context.Request, message);

Expand Down

0 comments on commit 9a0bda6

Please sign in to comment.