:thread-please: Do you think framework should log ...
# ktor
🧵 Do you think framework should log all (successful and failed) requests by default? https://github.com/ktorio/ktor/issues/319
He makes a good argument. Also, since its an opt-in feature I cant see a problem with it being "verbose" by default.
Failed yes, success no IMHO... would be easy too verbose and swamp the failure messages...
Yes. Not logging success is an optimisation.
On my production system (running ktor in a kind-of heroku enviroment) I can “only” post about 100 lines per second to stdout until the locking in some lower levels won’t allow ktor to response to request in reasonable time. So I would really prefer not to log success requests in INFO.
elizarov is right that the log is a typically starting point of investigation, but this won’t work any more when you have more than a few users per minute
I think logging framework should allow switching levels dynamically at runtime, but SLF4J doesn’t have it. Dropwizard for example employs logback directly and uses its facilities.
I couldn't believe slf4j couldn't change logging levels at runtime so had to dig. Only workaround I found was this: http://projects.lidalia.org.uk/lidalia-slf4j-ext/ But yep... that seems like a bug on slf4j 😛