There is a proposal to change the default log leve...
# ktor
e
There is a proposal to change the default log level for
CallLogging
Ktor feature to
INFO
and use
INFO
as a default log threshold in all the sample log configuration files. So, by default,
INFO
,
WARN
, and
ERROR
will get printed. The idea that you should see all the requests in your logs and if you want to get more detailed logs (
DEBUG
or
TRACE
) from certain subsystems/parts of your Ktor app, then you can go and turn on finer-grained logging level for those subsystems. What do you think? What is you experience with logging level?
h
I work a lot in the Play framework and regularly use WARN as the default loglevel. I turn on INFO (or debug/trace) only when needed. But when I need access logs, I do have an Nginx server in front with the regular web logs, so if a ktor server should be standalone ... I'm open to whatever.
s
I think default should be
DEBUG
. In production you will most likely use
INFO
as your default loglevel but for local development people mostly run at
DEBUG
,
TRACE
is too verbose for most libraries. In production you will still be collecting request logs from LB so you will not normally need requests to be logged by Ktor unless something really weird is happening between LB and Ktor instances
d
I agree w/ @Sergey Chikin, in our environment we use metrics dbs like Prometheus, logs are too verbose on a production cluster and is collected mainly for errors in an elk stack...
s
Actually Prometheus integration feature out of box would be very nice for production
1