Coder Social home page Coder Social logo

quarkiverse / quarkus-logging-manager Goto Github PK

View Code? Open in Web Editor NEW
50.0 6.0 15.0 4.46 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.31% JavaScript 6.69%
quarkus-extension

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
/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 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=/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

📖

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

quarkus-logging-manager's People

Contributors

actions-user avatar allcontributors[bot] avatar bulldog98 avatar dependabot[bot] avatar gastaldi avatar manofthepeace avatar maxandersen avatar oscarfh avatar phillip-kruger avatar pierrebtz avatar quarkiversebot avatar speedsterf2 avatar spieps avatar stuartwdouglas avatar survivant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

quarkus-logging-manager's Issues

JUL substitution not working

When doing

LOG.log(Level.INFO, "{0} is saying hello", name);

The log prints:

{0} is saying hello

and the substitution is happening.

Zoom the terminal

Add a feature that can zoom the text in the terminal (log stream)

Add UI

Add a GUI, that allows changing the levels and potentially also stream the log to the browser.

patch for working with quarkus 1.12.2.Final

diff --git a/deployment/src/main/java/io/quarkiverse/loggingmanager/deployment/LoggingManagerProcessor.java b/deployment/src/main/java/io/quarkiverse/loggingmanager/deployment/LoggingManagerProcessor.java
index 53310b6..30c4ebc 100644
--- a/deployment/src/main/java/io/quarkiverse/loggingmanager/deployment/LoggingManagerProcessor.java
+++ b/deployment/src/main/java/io/quarkiverse/loggingmanager/deployment/LoggingManagerProcessor.java
@@ -193,7 +193,8 @@ class LoggingManagerProcessor {
@record(ExecutionTime.STATIC_INIT)
public HistoryHandlerBuildItem hander(BuildProducer logHandlerBuildItemBuildProducer,
LogStreamRecorder recorder) {

  •    RuntimeValue<Optional<HistoryHandler>> handler = recorder.handler();
    
  •    // Should be made configurable:
    
  •    RuntimeValue<Optional<HistoryHandler>> handler = recorder.handler(50);
       logHandlerBuildItemBuildProducer.produce(new LogHandlerBuildItem((RuntimeValue) handler));
       return new HistoryHandlerBuildItem(handler);
    
    }
    diff --git a/pom.xml b/pom.xml
    index 37cd4e7..4a458df 100644
    --- a/pom.xml
    +++ b/pom.xml
    @@ -21,7 +21,7 @@
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.parameters>true</maven.compiler.parameters>
  •    <quarkus.version>1.12.1.Final</quarkus.version>
    
  •    <quarkus.version>1.12.2.Final</quarkus.version>
       <compiler-plugin.version>3.8.1</compiler-plugin.version>
    

Unable to build due to missing mvnpm dependency

I was able to build with quarkus 3.7.1 earlier today but our build started failing later with a clean maven repository.

Looks like mvnpm is missing some versions of ssr-dom-shim?

Disabling quarkus-logging-manager fixed the issue for the moment, which is not ideal of course.

[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.7.1:generate-code (default) on project eae: Quarkus code generation phase has failed: Failed to collect dependencies for io.quarkiverse.loggingmanager:quarkus-logging-manager-deployment:jar:3.0.3: Failed to collect dependencies at io.quarkus:quarkus-vertx-http-deployment:jar:3.7.1 -> io.quarkus:quarkus-vertx-http-dev-ui-resources:jar:3.7.1 -> org.mvnpm.at.mvnpm:vaadin-webcomponents:jar:24.3.0 -> org.mvnpm:lit:jar:3.0.0 -> org.mvnpm:lit-element:jar:4.0.4 -> org.mvnpm.at.lit-labs:ssr-dom-shim:jar:[1.2.0,2): No versions available for org.mvnpm.at.lit-labs:ssr-dom-shim:jar:[1.2.0,2) within specified range -> [Help 1]

@phillip-kruger I think you are also maintainer for mvnpm if I am not mistaken, would the issue lie somewhere there?

logging-manager-ui not working in native-image build on linux x86

When building my quarkus application as native image for linux, everything works except the logging-manager-ui endpoint.
The error message I get is:

RESTEASY003210: Could not find resource for full path: http//localhost:4020/q/logging-manager-ui

Can anyone help?

Thanks, very much in advance!

version 3.0.0 no longer works because of missing javascript files

when we try the new version we got a lots of errors because of missing javascript files:

:8009/q/dev/resource…bootstrap.min.css:1 
 Failed to load resource: the server responded with a status of 404 (Not Found)
:8009/q/dev/resource…css/logstream.css:1 
 Failed to load resource: the server responded with a status of 404 (Not Found)
:8009/q/dev/resource…e/css/all.min.css:1 
 Failed to load resource: the server responded with a status of 404 (Not Found)
jquery.min.js:1 
 Failed to load resource: the server responded with a status of 404 (Not Found)
bootstrap.bundle.min.js:1 
 Failed to load resource: the server responded with a status of 404 (Not Found)
logstream.js:1 
 Failed to load resource: the server responded with a status of 404 (Not Found)
:8009/q/dev/resource…mages/favicon.ico:1

Show logs in the past

As a user, I want to be able to see logs in the past, so I can see information of things that happened before I open the UI.

Notes:

  • This is not meant to replace a persistent log storage. Therefore we can/should have a limited buffer to keep the messages and older messages can be discarded
  • The size of this buffer can be (runtime) configurable

open-api warnings

Hello,
my swagger-ui shows warnings:

{
  "messages": [
    "attribute paths.'/q/logging-manager'(get).responses.200.description is missing",
    "attribute paths.'/q/logging-manager/levels'(get).responses.200.description is missing"
  ],
  "schemaValidationMessages": [
    {
      "level": "error",
      "domain": "validation",
      "keyword": "oneOf",
      "message": "instance failed to match exactly one schema (matched 0 out of 2)",
      "schema": {
        "loadingURI": "#",
        "pointer": "/definitions/Components/properties/securitySchemes/patternProperties/^[a-zA-Z0-9\\.\\-_]+$"
      },
      "instance": {
        "pointer": "/components/securitySchemes/keycloak_auth"
      }
    }
  ]

in my application.properties i define following security for log-manager

quarkus.logging-manager.openapi.included=true
quarkus.http.auth.policy.logging-policy.roles-allowed=technical_admin
quarkus.http.auth.permission.logging.paths=/q/logging-manager/*
quarkus.http.auth.permission.logging.policy=logging-policy

the logging-part of the swagger.json is at follows

/q/logging-manager:
    summary: "Return info on all loggers, or a specific logger"
    description: Logging Manager Loggers
    get:
      tags:
      - system info (private)
      summary: Information on Logger(s)
      description: Get information on all loggers or a specific logger.
      operationId: logging_manager_get_all
      parameters:
      - name: loggerName
        in: query
        schema:
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListLoggerInfo'
        "404":
          description: Not Found
    post:
      tags:
      - system info (private)
      summary: Update log level
      description: Update a log level for a certain logger
      operationId: logging_manager_update
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                loggerLevel:
                  $ref: '#/components/schemas/LoggerLevel'
                loggerName:
                  $ref: '#/components/schemas/LoggerName'
      responses:
        "201":
          description: Created
  /q/logging-manager/levels:
    summary: Return all levels that is available
    description: 'All available levels '
    get:
      tags:
      - system info (private)
      summary: Get all available levels
      description: This returns all possible log levels
      operationId: logging_manager_levels
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListString'{
  "messages": [
    "attribute paths.'/q/logging-manager'(get).responses.200.description is missing",
    "attribute paths.'/q/logging-manager/levels'(get).responses.200.description is missing"
  ],
  "schemaValidationMessages": [
    {
      "level": "error",
      "domain": "validation",
      "keyword": "oneOf",
      "message": "instance failed to match exactly one schema (matched 0 out of 2)",
      "schema": {
        "loadingURI": "#",
        "pointer": "/definitions/Components/properties/securitySchemes/patternProperties/^[a-zA-Z0-9\\.\\-_]+$"
      },
      "instance": {
        "pointer": "/components/securitySchemes/keycloak_auth"
      }
    }
  ]


All swagger-ui works as far as i can see, even authorization for the log-manager apis. It's just a warning at the bottom of the swagger-page.
We are using quarkus 1.13.6.Final and logging-manager 1.1.3

Endpoints are not found when the application is build

Hello,

I added the extension to my project but once deployed, I can't access the endpoints to get the loggers for instance. It works locally.
curl localhost:8090/q/logging-manager returns a 404

Is there something specific to do to have the endpoints?

pom.xml

        <dependency>
            <groupId>io.quarkiverse.loggingmanager</groupId>
            <artifactId>quarkus-logging-manager</artifactId>
            <version>2.1.4</version>
            <scope>runtime</scope>
        </dependency>

application.properties

quarkus.logging-manager.openapi.included=true
quarkus.logging-manager.ui.always-include=true

openapi and security

Enhance the openapi to add the security automatically depending on what is configured in config

Startup Error during tests

Using

quarkus: 
  logging-manager:
    openapi:
      included: true

and

            <dependency>
                <groupId>io.quarkiverse.loggingmanager</groupId>
                <artifactId>quarkus-logging-manager</artifactId>
                <version>2.1.0</version>
            </dependency>

(also with runtime)

I get:

 java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.smallrye.openapi.deployment.SmallRyeOpenApiProcessor#build threw an exception: java.util.ServiceConfigurationError: org.eclipse.microprofile.openapi.spi.OASFactoryResolver: io.smallrye.openapi.spi.OASFactoryResolverImpl not a subtype
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:589)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1237)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265)
	at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300)
	at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385)
	at org.eclipse.microprofile.openapi.spi.OASFactoryResolver.loadSpi(OASFactoryResolver.java:96)
	at org.eclipse.microprofile.openapi.spi.OASFactoryResolver.loadSpi(OASFactoryResolver.java:92)
	at org.eclipse.microprofile.openapi.spi.OASFactoryResolver.loadSpi(OASFactoryResolver.java:92)
	at org.eclipse.microprofile.openapi.spi.OASFactoryResolver.instance(OASFactoryResolver.java:74)
	at org.eclipse.microprofile.openapi.OASFactory.createObject(OASFactory.java:79)
	at org.eclipse.microprofile.openapi.OASFactory.createPathItem(OASFactory.java:124)
	at io.quarkiverse.loggingmanager.deployment.LoggingManagerOpenAPIFilter.createLoggersPathItem(LoggingManagerOpenAPIFilter.java:114)
	at io.quarkiverse.loggingmanager.deployment.LoggingManagerOpenAPIFilter.filterOpenAPI(LoggingManagerOpenAPIFilter.java:64)
	at io.smallrye.openapi.api.util.FilterUtil.applyFilter(FilterUtil.java:61)
	at io.smallrye.openapi.api.OpenApiDocument.filterModel(OpenApiDocument.java:179)
	at io.smallrye.openapi.api.OpenApiDocument.initialize(OpenApiDocument.java:138)
	at io.quarkus.smallrye.openapi.deployment.SmallRyeOpenApiProcessor.loadDocument(SmallRyeOpenApiProcessor.java:628)
	at io.quarkus.smallrye.openapi.deployment.SmallRyeOpenApiProcessor.build(SmallRyeOpenApiProcessor.java:383)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at java.base/java.lang.Thread.run(Thread.java:829)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)


	at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:737)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:810)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.api.extension.InvocationInterceptor.interceptTestClassConstructor(InvocationInterceptor.java:72)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:77)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestClassConstructor(ClassBasedTestDescriptor.java:342)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateTestClass(ClassBasedTestDescriptor.java:289)
	at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateTestClass(ClassTestDescriptor.java:79)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:267)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$2(ClassBasedTestDescriptor.java:259)
	at java.base/java.util.Optional.orElseGet(Optional.java:369)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$3(ClassBasedTestDescriptor.java:258)
	at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:101)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:100)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:65)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$1(NodeTestTask.java:111)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:111)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:79)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.smallrye.openapi.deployment.SmallRyeOpenApiProcessor#build threw an exception: java.util.ServiceConfigurationError: org.eclipse.microprofile.openapi.spi.OASFactoryResolver: io.smallrye.openapi.spi.OASFactoryResolverImpl not a subtype
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:589)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1237)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265)
	at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300)
	at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385)
	at org.eclipse.microprofile.openapi.spi.OASFactoryResolver.loadSpi(OASFactoryResolver.java:96)
	at org.eclipse.microprofile.openapi.spi.OASFactoryResolver.loadSpi(OASFactoryResolver.java:92)
	at org.eclipse.microprofile.openapi.spi.OASFactoryResolver.loadSpi(OASFactoryResolver.java:92)
	at org.eclipse.microprofile.openapi.spi.OASFactoryResolver.instance(OASFactoryResolver.java:74)
	at org.eclipse.microprofile.openapi.OASFactory.createObject(OASFactory.java:79)
	at org.eclipse.microprofile.openapi.OASFactory.createPathItem(OASFactory.java:124)
	at io.quarkiverse.loggingmanager.deployment.LoggingManagerOpenAPIFilter.createLoggersPathItem(LoggingManagerOpenAPIFilter.java:114)
	at io.quarkiverse.loggingmanager.deployment.LoggingManagerOpenAPIFilter.filterOpenAPI(LoggingManagerOpenAPIFilter.java:64)
	at io.smallrye.openapi.api.util.FilterUtil.applyFilter(FilterUtil.java:61)
	at io.smallrye.openapi.api.OpenApiDocument.filterModel(OpenApiDocument.java:179)
	at io.smallrye.openapi.api.OpenApiDocument.initialize(OpenApiDocument.java:138)
	at io.quarkus.smallrye.openapi.deployment.SmallRyeOpenApiProcessor.loadDocument(SmallRyeOpenApiProcessor.java:628)
	at io.quarkus.smallrye.openapi.deployment.SmallRyeOpenApiProcessor.build(SmallRyeOpenApiProcessor.java:383)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at java.base/java.lang.Thread.run(Thread.java:829)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)

	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:415)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:275)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:66)
	at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:369)
	at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:705)
	at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:752)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:368)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:192)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:78)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:136)
	... 31 more
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.smallrye.openapi.deployment.SmallRyeOpenApiProcessor#build threw an exception: java.util.ServiceConfigurationError: org.eclipse.microprofile.openapi.spi.OASFactoryResolver: io.smallrye.openapi.spi.OASFactoryResolverImpl not a subtype
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:589)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1237)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265)
	at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300)
	at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385)
	at org.eclipse.microprofile.openapi.spi.OASFactoryResolver.loadSpi(OASFactoryResolver.java:96)
	at org.eclipse.microprofile.openapi.spi.OASFactoryResolver.loadSpi(OASFactoryResolver.java:92)
	at org.eclipse.microprofile.openapi.spi.OASFactoryResolver.loadSpi(OASFactoryResolver.java:92)
	at org.eclipse.microprofile.openapi.spi.OASFactoryResolver.instance(OASFactoryResolver.java:74)
	at org.eclipse.microprofile.openapi.OASFactory.createObject(OASFactory.java:79)
	at org.eclipse.microprofile.openapi.OASFactory.createPathItem(OASFactory.java:124)
	at io.quarkiverse.loggingmanager.deployment.LoggingManagerOpenAPIFilter.createLoggersPathItem(LoggingManagerOpenAPIFilter.java:114)
	at io.quarkiverse.loggingmanager.deployment.LoggingManagerOpenAPIFilter.filterOpenAPI(LoggingManagerOpenAPIFilter.java:64)
	at io.smallrye.openapi.api.util.FilterUtil.applyFilter(FilterUtil.java:61)
	at io.smallrye.openapi.api.OpenApiDocument.filterModel(OpenApiDocument.java:179)
	at io.smallrye.openapi.api.OpenApiDocument.initialize(OpenApiDocument.java:138)
	at io.quarkus.smallrye.openapi.deployment.SmallRyeOpenApiProcessor.loadDocument(SmallRyeOpenApiProcessor.java:628)
	at io.quarkus.smallrye.openapi.deployment.SmallRyeOpenApiProcessor.build(SmallRyeOpenApiProcessor.java:383)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at java.base/java.lang.Thread.run(Thread.java:829)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)

	at io.quarkus.builder.Execution.run(Execution.java:116)
	at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
	at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:151)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:413)
	... 42 more
Caused by: java.util.ServiceConfigurationError: org.eclipse.microprofile.openapi.spi.OASFactoryResolver: io.smallrye.openapi.spi.OASFactoryResolverImpl not a subtype
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:589)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1237)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265)
	at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300)
	at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385)
	at org.eclipse.microprofile.openapi.spi.OASFactoryResolver.loadSpi(OASFactoryResolver.java:96)
	at org.eclipse.microprofile.openapi.spi.OASFactoryResolver.loadSpi(OASFactoryResolver.java:92)
	at org.eclipse.microprofile.openapi.spi.OASFactoryResolver.loadSpi(OASFactoryResolver.java:92)
	at org.eclipse.microprofile.openapi.spi.OASFactoryResolver.instance(OASFactoryResolver.java:74)
	at org.eclipse.microprofile.openapi.OASFactory.createObject(OASFactory.java:79)
	at org.eclipse.microprofile.openapi.OASFactory.createPathItem(OASFactory.java:124)
	at io.quarkiverse.loggingmanager.deployment.LoggingManagerOpenAPIFilter.createLoggersPathItem(LoggingManagerOpenAPIFilter.java:114)
	at io.quarkiverse.loggingmanager.deployment.LoggingManagerOpenAPIFilter.filterOpenAPI(LoggingManagerOpenAPIFilter.java:64)
	at io.smallrye.openapi.api.util.FilterUtil.applyFilter(FilterUtil.java:61)
	at io.smallrye.openapi.api.OpenApiDocument.filterModel(OpenApiDocument.java:179)
	at io.smallrye.openapi.api.OpenApiDocument.initialize(OpenApiDocument.java:138)
	at io.quarkus.smallrye.openapi.deployment.SmallRyeOpenApiProcessor.loadDocument(SmallRyeOpenApiProcessor.java:628)
	at io.quarkus.smallrye.openapi.deployment.SmallRyeOpenApiProcessor.build(SmallRyeOpenApiProcessor.java:383)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at java.base/java.lang.Thread.run(Thread.java:829)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)

Any ideas? As soon as I take the configuration out, the test works again.

The test does nothing but starting the application in the prod profile really:

@QuarkusTest
@TestProfile(ProdTag.class)
class CoreStartupTest {

	@ConfigProperty(name = "quarkus.application.name")
	String name;

	@Test
	void fakeConfigTest() {
		// execute this test with PROD profile to identify production
		// configuration problems
		assertThat(this.name).isNotEmpty();
	}
}

Websocket path

Make the websocket path to be under the nonApplication root and configurable.

should be able to add logger level at runtime

from the UI and REST API, we should be able to add logger at runtime.

ex :
I could have : org.abc.database.level=ERROR
but I want to add
org.abc.label=debug

I didn't saw a ADD logger from the UI

Add OpenApiSpec for the endpoints

Hi @oscarfh

Can I help with this ? I have done something similar for Health Endpoints.

Also, have a look at this (might give you some ideas) - I did this a few years ago, so not up to date, but it not only allowed you to change the log level in the UI, but you can also see the log (based on some namespace).

quarkus.logging-manager.history-size config not working

quarkus.logging-manager.history-size configuration property not working.
I tried to set this property value as 10000 but when I come back to UI still, I can see only 50 records on UI.
Did I miss anything here ?

I am using latest version <quarkus-logging-manager.version>2.1.4</quarkus-logging-manager.version>
Quarkus version : <quarkus.platform.version>2.12.2.Final</quarkus.platform.version>

Question : Why not use rest-easy ?

why not use

<dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-resteasy</artifactId>
        </dependency>

and

import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

instead of

import io.vertx.core.Handler;
import io.vertx.core.http.HttpMethod;
import io.vertx.core.http.HttpServerRequest;
import io.vertx.core.http.HttpServerResponse;
import io.vertx.ext.web.RoutingContext; 
...

with

<dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-smallrye-openapi</artifactId>
        </dependency>

we should have all the endpoint detected with swagger-ui

Ability to restore log levels

As a user, I want to be able to restore log levels, so everything is back to how it was configured when the service started

Notes:

  • If someone else made some change before I open the UI and I reset, everything is back to what it was configured
  • The original value is the value in the "configured" field for each logger

How to customize package hierarchy displayed in "Log Levels" window

Hi ,

As per current implementation , application packages are displayed as separated entries with their corresponding Log level.
Is there any way, we can group them in tree hierarchy.
for eg: if com.test and com.test.anothertest can be shown in tree hierarchy with parent node as com.test.
Any suggestion would be helpful.

Thanks

change the name to avoid spaces in URL

I added this in my pom.xml

When I active swagger and I try to retreive the logger, I found that the URL is this :

http://localhost:8383/swagger-ui/#/Logging%20UI/loggerui_base_levels

<!-- https://mvnrepository.com/artifact/io.quarkiverse.loggingui/quarkus-logging-ui -->
        <dependency>
            <groupId>io.quarkiverse.loggingui</groupId>
            <artifactId>quarkus-logging-ui</artifactId>
            <version>0.0.5</version>
        </dependency>

my application.properties

# Required to benefit from swagger-ui with a native image
quarkus.swagger-ui.always-include=true
quarkus.logging-ui.openapi.included=true

here my pom.xml from

<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.api</groupId>
    <artifactId>kubernetes-api</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <properties>
        <java.version>11</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <maven.compiler.parameters>true</maven.compiler.parameters>
        <compiler-plugin.version>3.8.1</compiler-plugin.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <quarkus-plugin.version>1.10.3.Final</quarkus-plugin.version>
        <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
        <quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
        <quarkus.platform.version>1.10.3.Final</quarkus.platform.version>
        <surefire-plugin.version>2.22.1</surefire-plugin.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>${quarkus.platform.group-id}</groupId>
                <artifactId>${quarkus.platform.artifact-id}</artifactId>
                <version>${quarkus.platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <!-- https://mvnrepository.com/artifact/io.quarkiverse.loggingui/quarkus-logging-ui -->
        <dependency>
            <groupId>io.quarkiverse.loggingui</groupId>
            <artifactId>quarkus-logging-ui</artifactId>
            <version>0.0.5</version>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-resteasy</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-junit5</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-smallrye-openapi</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-kubernetes-client</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-smallrye-fault-tolerance</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-smallrye-health</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-kubernetes</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-smallrye-metrics</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-spring-boot-properties</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-resteasy-jsonb</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-container-image-docker</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-maven-plugin</artifactId>
                <version>${quarkus-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>build</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${compiler-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire-plugin.version}</version>
                <configuration>
                    <systemProperties>
                        <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                    </systemProperties>
                </configuration>
            </plugin>
            <!-- Plugin for release builds on Jenkins (https://github.com/aleksandr-m/gitflow-maven-plugin) -->
            <plugin>
                <groupId>com.amashchenko.maven.plugin</groupId>
                <artifactId>gitflow-maven-plugin</artifactId>
                <version>1.11.0</version>
                <configuration>
                    <commitMessages>
                        <releaseStartMessage>BUILD Update versions for release</releaseStartMessage>
                        <releaseFinishMessage>BUILD Update for next development version</releaseFinishMessage>
                        <releaseVersionUpdateMessage>BUILD Update for next development version
                        </releaseVersionUpdateMessage>
                    </commitMessages>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>native</id>
            <activation>
                <property>
                    <name>native</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>${surefire-plugin.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
                                    <goal>verify</goal>
                                </goals>
                                <configuration>
                                    <systemProperties>
                                        <native.image.path>
                                            ${project.build.directory}/${project.build.finalName}-runner
                                        </native.image.path>
                                    </systemProperties>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <properties>
                <quarkus.package.type>native</quarkus.package.type>
            </properties>
        </profile>
        <profile>
            <id>integration-test</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>${surefire-plugin.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
                                    <goal>verify</goal>
                                </goals>
                                <configuration>
                                    <includes>
                                        <include>**/*IT.java</include>
                                    </includes>
                                    <excludes>
                                        <exclude>**/*Native*IT.java</exclude>
                                    </excludes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>

I'm running my application with : mvn quarkus:dev

Add docs module

It would be nice if this extension had a docs/ module so it could be included in the Quarkiverse docs website

Add Log Streaming in the UI

We are going to add an UI in #11 .
In case this is not done in the mentioned task, we should add the capability for the UI to show logs in (near) realtime to the user (streaming).
The current idea is to use websockets, and Stompee can be used as an inspiration for the solution.

Bootstrap and fontawesome

Switch to Bootstrap and font-awesome to better align with Dev UI.
(We might want to pull this into Dev UI )

Rename

I want to propose that we rename this from logging-ui to log-manager.
This extension allows you to manage your loggers, and also have a ui component to it (in progress)
w.d.y.t ?

1.13.x issues

  • Logo not showing
  • Exceptions not printing (clickable) when using classname
  • Initial state is wrong (not showing)

ClassNotFound Exception While Building

I added the extension to my project and I got this exception while building.

Failed to build quarkus application: java.lang.RuntimeException: Failed to load steps from class 
   io.quarkiverse.loggingmanager.deployment.LoggingManagerProcessor: 
io/quarkus/vertx/http/deployment/NonApplicationRootPathBuildItem: 
    io.quarkus.vertx.http.deployment.NonApplicationRootPathBuildItem 

My Quarkus platform and Quarkus plugin versions are 1.10.5.Final

oom on build

are you adding a big zip to the static resources?

[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:2.10.3.Final:build (default) on project foo: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkiverse.loggingmanager.deployment.LoggingManagerProcessor#includeUiAndWebsocket threw an exception: java.lang.OutOfMemoryError: Java heap space
[ERROR] at java.base/java.io.InputStream.readNBytes(InputStream.java:405)
[ERROR] at java.base/java.io.InputStream.readAllBytes(InputStream.java:346)
[ERROR] at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.newByteChannel(ZipFileSystem.java:967)
[ERROR] at jdk.zipfs/jdk.nio.zipfs.ZipPath.newByteChannel(ZipPath.java:864)
[ERROR] at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newByteChannel(ZipFileSystemProvider.java:238)
[ERROR] at java.base/java.nio.file.Files.newByteChannel(Files.java:375)
[ERROR] at java.base/java.nio.file.Files.newByteChannel(Files.java:426)
[ERROR] at java.base/java.nio.file.Files.readAllBytes(Files.java:3272)
[ERROR] at io.quarkiverse.loggingmanager.deployment.LoggingManagerProcessor.addStaticResource(LoggingManagerProcessor.java:352)
[ERROR] at io.quarkiverse.loggingmanager.deployment.LoggingManagerProcessor.includeUiAndWebsocket(LoggingManagerProcessor.java:204)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[ERROR] at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:944)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] at io.quarkus.builder.BuildContext$$Lambda$816/0x00000008018963d8.run(Unknown Source)
[ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:831)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR]
[ERROR] [error]: Build step io.quarkus.deployment.steps.ApplicationIndexBuildStep#build threw an exception: java.lang.OutOfMemoryError: Java heap space
[ERROR] at java.base/java.util.Arrays.copyOf(Arrays.java:3536)
[ERROR] at org.jboss.jandex.Indexer.sizeToFit(Indexer.java:238)
[ERROR] at org.jboss.jandex.Indexer.processConstantPool(Indexer.java:1881)
[ERROR] at org.jboss.jandex.Indexer.index(Indexer.java:1981)
[ERROR] at io.quarkus.deployment.steps.ApplicationIndexBuildStep$1.visitFile(ApplicationIndexBuildStep.java:49)
[ERROR] at io.quarkus.deployment.steps.ApplicationIndexBuildStep$1.visitFile(ApplicationIndexBuildStep.java:34)
[ERROR] at java.base/java.nio.file.Files.walkFileTree(Files.java:2804)
[ERROR] at java.base/java.nio.file.Files.walkFileTree(Files.java:2876)
[ERROR] at io.quarkus.deployment.steps.ApplicationIndexBuildStep.build(ApplicationIndexBuildStep.java:34)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[ERROR] at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:944)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] at io.quarkus.builder.BuildContext$$Lambda$816/0x00000008018963d8.run(Unknown Source)
[ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:831)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)

Quarkus 1.12.1.Final caused : io.quarkiverse.loggingmanager.deployment.LoggingManagerProcessor#includeUiAndWebsocket threw an exception: java.lang.NoSuchMethodError: 'java.lang.String

I updated Quarkus to 1.12.1.Final and now I got this error.

<dependency>
            <groupId>io.quarkiverse.loggingmanager</groupId>
            <artifactId>quarkus-logging-manager</artifactId>
            <version>1.1.0</version>
        </dependency>
java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkiverse.loggingmanager.deployment.LoggingManagerProcessor#includeUiAndWebsocket threw an exception: java.lang.NoSuchMethodError: 'java.lang.String io.quarkus.vertx.http.deployment.NonApplicationRootPathBuildItem.adjustPath(java.lang.String)'
	at io.quarkiverse.loggingmanager.deployment.LoggingManagerProcessor.includeUiAndWebsocket(LoggingManagerProcessor.java:155)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
	at java.base/java.lang.Thread.run(Thread.java:834)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)

Dev UI fails to load with this extension if using Quarkus 2.6.1

java.lang.RuntimeException: Failed to locate 'artifact' or 'group-id' and 'artifact-id' among metadata keys [name, metadata]
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsole.getExtensionNamespace(DevConsole.java:223)
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsole.lambda$initLazyState$1(DevConsole.java:85)
	at io.smallrye.common.classloader.ClassPathUtils.lambda$consumeAsPath$0(ClassPathUtils.java:102)
	at io.smallrye.common.classloader.ClassPathUtils.processAsPath(ClassPathUtils.java:133)
	at io.smallrye.common.classloader.ClassPathUtils.consumeAsPath(ClassPathUtils.java:101)
	at io.smallrye.common.classloader.ClassPathUtils.consumeAsPaths(ClassPathUtils.java:85)
	at io.smallrye.common.classloader.ClassPathUtils.consumeAsPaths(ClassPathUtils.java:66)
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsole.initLazyState(DevConsole.java:72)
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsole.handle(DevConsole.java:98)
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsole.handle(DevConsole.java:36)
	at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1193)
	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:163)
	at io.vertx.ext.web.impl.RoutingContextWrapper.next(RoutingContextWrapper.java:201)
	at io.quarkus.vertx.http.deployment.devmode.console.FlashScopeHandler.handle(FlashScopeHandler.java:12)
	at io.quarkus.vertx.http.deployment.devmode.console.FlashScopeHandler.handle(FlashScopeHandler.java:7)
	at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1193)
	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:163)
	at io.vertx.ext.web.impl.RoutingContextWrapper.next(RoutingContextWrapper.java:201)
	at io.vertx.ext.web.impl.RouterImpl.handleContext(RouterImpl.java:248)
	at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1193)
	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:163)
	at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:141)
	at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:67)
	at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:37)
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsoleProcessor$2$1.handle(DevConsoleProcessor.java:203)
	at io.quarkus.vertx.http.deployment.devmode.console.DevConsoleProcessor$2$1.handle(DevConsoleProcessor.java:200)
	at io.vertx.core.impl.EventLoopContext.emit(EventLoopContext.java:50)
	at io.vertx.core.impl.EventLoopContext.lambda$emit$1(EventLoopContext.java:57)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)

I don't think this is relevant, but quarkus-logging-manager is added via a Maven profile (qdev). It's working fine with Quarkus 2.5.4.

Logging manager UI is not working in native image mode

The UI log manager page loads but is not displayed correctly and is not functional. The reason is all static resources are not included into the native image:

GET http://localhost/q/logging-manager-ui/fontawesome/css/all.min.css net::ERR_ABORTED 404
fanhub-game-launcher.gldn-uat.bv-int-test.com/:11 
GET http://localhost/q/logging-manager-ui/css/logstream.css net::ERR_ABORTED 404
fanhub-game-launcher.gldn-uat.bv-int-test.com/:9 
GET http://localhost/q/logging-manager-ui/css/bootstrap.min.css net::ERR_ABORTED 404
fanhub-game-launcher.gldn-uat.bv-int-test.com/:251 
GET http://localhost/q/logging-manager-ui/js/jquery.min.js net::ERR_ABORTED 404
fanhub-game-launcher.gldn-uat.bv-int-test.com/:256 
GET http://localhost/q/logging-manager-ui/js/logstream.js net::ERR_ABORTED 404
fanhub-game-launcher.gldn-uat.bv-int-test.com/:252 
GET http://localhost/q/logging-manager-ui/js/bootstrap.bundle.min.js net::ERR_ABORTED 404
fanhub-game-launcher.gldn-uat.bv-int-test.com/:258 
GET http://localhost/q/logging-manager-ui/js/logstream.js net::ERR_ABORTED 404

Add application name

Add the application name in the title and on the page, to make it more visible what log you are viewing.

Authentication with bearer token

My Rest service uses a bearer token for authentication. And in the Swagger UI I see the authentication button. Now I have included logging manager also in Swagger UI, but it is not showing any authentication button. Then when I make a rest call, I get the message "Authorization header was null".
How can I configure the Logging Manager via the application.properties so that it also takes the Bearer Token?

NullPointer when setting logger level to null

I want to reset a level log. (LogController.updateLogLevel(loggerName, null);)

in LoggerHandler

private void handlePost(HttpServerRequest request, HttpServerResponse response) {

        String loggerName = request.getFormAttribute(LOGGER_NAME_PARAM);
        String loggerLevel = request.getFormAttribute(LOGGER_LEVEL_PARAM);
        if (loggerLevel == null || loggerLevel.isEmpty()) {
            LogController.updateLogLevel(loggerName, null);
        } else {
            LogController.updateLogLevel(loggerName, loggerLevel);
        }

        response.setStatusCode(201).end();

    }

We have this error

2021-06-08 13:48:08,608 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (vert.x-eventloop-thread-8) HTTP Request to /q/logging-manager/ failed, error id: bd220dfe-9714-481d-a2c0-e1b8318efdd2-1: java.lang.NullPointerException
        at java.logging/java.util.logging.Level.parse(Level.java:478)
        at io.quarkus.vertx.http.runtime.logstream.LogController.updateLogLevel(LogController.java:82)
        at io.quarkiverse.loggingmanager.LoggerHandler.handlePost(LoggerHandler.java:47)
        at io.quarkiverse.loggingmanager.LoggerHandler.handle(LoggerHandler.java:27)
        at io.quarkiverse.loggingmanager.LoggerHandler.handle(LoggerHandler.java:13)
        at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1038)

in LogController.updateLogLevel

public static void updateLogLevel(String loggerName, String levelValue) {
        LogContext logContext = LogContext.getLogContext();
        org.jboss.logmanager.Logger logger = logContext.getLogger(loggerName);
        if (logger != null) {
            Level level = org.jboss.logmanager.Level.parse(levelValue);
            logger.setLevel(level);
            LOG.info("Log level updated [" + loggerName + "] changed to [" + levelValue + "]");
        }

    }

null is not in the enum.

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.