-
-
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
[FEATURE REQUEST] Disable verbose routes & controllers logging #1630
Comments
@AlbinoGeek both |
Ahh, okay! Thank you for explaining this. Somehow I missed the comment in the godoc. |
No worries, do you want to make any modifications there? e.g make the startuplog to disable both banner and the API trace? |
Perhaps a way to split up the two different kinds of debug output in the startup log and selectively disable them? Type 1
Type 2
|
OK @AlbinoGeek, for the Type 2 you could already disable it per-route. I've just pushed a commit which you can disable per party and its children (must be called before routes register). And on the Type 1, respectfully, you have the Type 2Disable all routes verbose logging: app := iris.New()
app.SetRoutesNoLog(true) Disable u := app.Party("/users").SetRoutesNoLog(true)
u.Get(...) Type 1m := mvc.New(app).SetControllersNoLog(true)
m.Handle(...) I took the initiative to change the title of this issue, if that's OK with you. |
iris.WithoutStartupLog
doesn't work
Totally acceptable! Thank you, this is wonderful. Basically, the need came about because Thank you! |
Yeah we dont have a Trace level yet, but its not hard to add one. But even if we had trace level this will disable/enable both type 1 and type 2, but you wanted to disable them selectively so... methods like these would exist even if we had trace level...therefore a Trace level is useless for now |
Summary
I added
iris.WithoutBanner, iris.WithoutStartupLog
and while the two-line banner was removed, the entire startup log showed unmodified than without providing the parameter.Versions, etc.
Code
Output
The text was updated successfully, but these errors were encountered: