commonlog's People
Forkers
steveteececommonlog's Issues
User-Agent
I'm still using this, now for Blazor Server Side (initial requests and for watching static files requests) and I would like to get the "User-Agent
", if this is possible with CommonLog? With the code below I am getting an empty string, Headers.Count
= 0;
CommonLogMiddleware.cs (example)
public async Task Invoke(HttpContext httpContext)
...
RemoteHost = httpContext.Connection.RemoteIpAddress.ToString(),
UserAgent = httpContext.Response.Headers["User-Agent"].ToString(),
Update: @ me, myself & I: Response? Seriously??
Write results to a file and/or database
Hi Chris,
I've implemented your CommonLog middleware at ictz.net and it's running smoothly.
I've tried to add some code to log the results to a file, but I was thinking way too simple (!). that's needs more thought. I've looked at SeriLog and NetEscapades.Extensions.Logging.RollingFile but I like your code because it's small and easy to implement, and does exactly what I'd like it to do: Log Kestrel http requests in a "CommonLog" format.
I will look further how to log the results to a file and/or database, but if you've any thoughts on this, it's much appreciated!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.