-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging with full QueryString #1017
Comments
Iris' request logger can communicate with the handlers to build and print a custom logQueryMiddleware := func(ctx iris.Context) {
ctx.Values().Set("URL Query", ctx.Request().URL.Query().Encode())
ctx.Next()
}
loggerConfig := logger.Config{
// ...
MessageContextKeys: []string{"URL Query"}, // <-- here
}
loggerMiddleware := logger.New(loggerConfig )
app.Use(logQueryMiddleware, loggerMiddleware) Although I've just pushed a commit to display the full url including the URL query if Upgrade with Star the github repository and stay tuned @andr33z ! |
… bool`, if true prints the full path, including the URL query as requested at #1017
BEST! Thank you |
… bool`, if true prints the full path, including the URL query as requested at kataras#1017 Former-commit-id: 03c8fc523a8ba955dae43e4c7e9498fc3d86a1c8
Examples for the Iris project can be found at
https://github.com/kataras/iris/tree/master/_examples.
Documentation for the Iris project can be found at
https://godoc.org/github.com/kataras/iris.
Love iris? Please consider supporting the project:
👉 https://iris-go.com/donate
Care to be part of a larger community? Fill our user experience form:
👉 https://goo.gl/forms/lnRbVgA6ICTkPyk02
====================================
❓ How to put full query string into custom log file?
i have following this reference to put custom file.
then i try to fire with this format :
http://localhost:9092/user/profile?name=andre&token=123123
then i check to my log file, it is not showing full request.
can anyone help me?
thank you
The text was updated successfully, but these errors were encountered: