Coder Social home page Coder Social logo

lgtm-migrator / quarkus-logging-manager Goto Github PK

View Code? Open in Web Editor NEW

This project forked from quarkiverse/quarkus-logging-manager

0.0 0.0 0.0 4.31 MB

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

License: Apache License 2.0

Java 93.14% HTML 6.86%

quarkus-logging-manager's Introduction

Logging Manager Extension

Maven Central All Contributors

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

Endpoint Http Method Description
/loggers GET Returns the list of all loggers, with information about the configured and effective level
/loggers?loggerName={loggerName} GET Returns the logger specified by this name, with information about the configured and effective level
/loggers POST Changes the log level of the specified logger
/loggers/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 here. 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=/loggers
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 /loggers 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

Then browse to http://localhost:8080/q/logging-manager-ui/

logger_manager_log_screenshot

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

  • Add online log viewer option
  • Graphical UI to read logger level
  • 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

💻 🚧

Phillip Krüger

💻 🚧

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

quarkus-logging-manager's People

Contributors

phillip-kruger avatar oscarfh avatar actions-user avatar dependabot[bot] avatar gastaldi avatar quarkiversebot avatar allcontributors[bot] avatar stuartwdouglas avatar maxandersen avatar survivant avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.