Skip to content

Quarkus extension that allows you to view the log online and change log levels using a UI

License

Notifications You must be signed in to change notification settings

quarkiverse/quarkus-logging-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logging Manager


Maven Central License Build

The Quarkus Logging Manager Extension provides you endpoints to visualize and manage the log level of your loggers.

Endpoint Http Method Description
/q/logging-manager GET Returns the list of all loggers, with information about the configured and effective level
/q/logging-manager?loggerName={loggerName} GET Returns the logger specified by this name, with information about the configured and effective level
/q/logging-manager POST Changes the log level of the specified logger
/q/logging-manager/levels GET Get all the available level

Security

Security of endpoints is important, and we do not want to allow unknown people to know (or worse, change!) the log levels of our applications. Fortunately we can secure our endpoints using Quarkus' default security mechanism, as described in Security Overview. All you have to do is define your application.properties similar to this:

quarkus.http.auth.basic=true # If you want basic auth. Multiple auth mechanism are supported

quarkus.http.auth.policy.admin-access.roles-allowed=admin
quarkus.http.auth.permission.roles1.paths=/q/logging-manager
quarkus.http.auth.permission.roles1.policy=admin-access

And, in case you chose Basic Auth, provide a IdentityProvider (either by implementing one or adding an extension that provides one). Quarkus will take care of matching the paths (in this case /q/logging-manager to the policy you defined and granting or denying access). Then you can also secure all the endpoints in your application using this configuration.

Example:

To use this in your application, simply add this in your pom.xml:

    <dependency>
        <groupId>io.quarkiverse.loggingmanager</groupId>
        <artifactId>quarkus-logging-manager</artifactId>
        <version>${logger-manager.version}</version>
        <scope>runtime</scope>
    </dependency>

Note: Replace ${logger-manager.version} with the latest version

OpenAPI

You can include the Logger Manager API in the OpenAPI document (and thus also Swagger UI). This needs to be enabled via config:

quarkus.logging-manager.openapi.included=true

This will then add the following to your OpenAPI:

swagger_manager screenshot

Roadmap

  • OpenApiSpec for the endpoints
  • Make endpoint configurable
  • Enable customizable security on the endpoint (see readme file)

Contributors ✨

Thanks goes to these wonderful people (emoji key):

oscarfh
oscarfh

💻 🚧
Phillip Krüger
Phillip Krüger

💻 🚧
manofthepeace
manofthepeace

🚧 💻
Seth Piepergerdes
Seth Piepergerdes

🚧 💻
Christian Thiel
Christian Thiel

💻
Sebastien Dionne
Sebastien Dionne

📖
Koekebakkert
Koekebakkert

🚧
Stuart Douglas
Stuart Douglas

💻
Pierre Beitz
Pierre Beitz

📖
Melloware
Melloware

💻 🚧
Guillaume Smet
Guillaume Smet

💻
Eric Wittmann
Eric Wittmann

⚠️
Michael Edgar
Michael Edgar

👀
Alex Kovalenko
Alex Kovalenko

🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

About

Quarkus extension that allows you to view the log online and change log levels using a UI

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published