SMILEY4 / ktor-swagger-ui

Kotlin Ktor plugin to generate OpenAPI and provide Swagger UI
Apache License 2.0
156 stars 25 forks source link

Disable logging #30

Closed LucasBoberg closed 1 year ago

LucasBoberg commented 1 year ago

It would be nice to be able to disable logging for swagger ui.

Maybe it is already possible but I cannot find it in the docs.

lns-ross commented 1 year ago

There's not an awful lot of logging, especially at INFO level. If you have enabled DEBUG for all packages, then simply reduce it back to INFO for this package (or even WARN if you don't care for the one-line summary it puts out at that level). For example in logback:

<logger name="io.github.smiley4" level="INFO"/>

But you will probably also need to reduce a lot of other packages if you have set a blanket default DEBUG level.

HTH.

SMILEY4 commented 1 year ago

Hi, most of the logging comes from another library i'm using, so i cannot disable/reduce these messages, though most/all of them are on debug level. With most logging-setups, you should also be able to disable logs from certain parts of your application, as @lns-ross already mentioned.