Repository: quarkusio/quarkus
Issue: QuarkusDelayedHandler prints an error and throws a log message away even if the queue was compacted

### Describe the bug

When the delayed log writer queue fills up and a compaction of the queue happens if the queue has space the method still returns and the logged message is lost no matter the log level. 

### Expected behavior

_No response_

### Actual behavior

_No response_

### How to Reproduce?

_No response_

### Output of `uname -a` or `ver`

_No response_

### Output of `java -version`

_No response_

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.1

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

_No response_

### Additional information

Possible fix is removing the return statement that happens even if the compact was successful.

```java
    @Override
    protected void doPublish(final ExtLogRecord record) {
        // If activated just delegate
        if (activated) {
            publishToNestedHandlers(record);
            super.doPublish(record);
        } else {
            synchronized (this) {
                // Check one more time to see if we've been activated before queuing the messages
                if (activated || buildTimeLoggingActivated) {
                    publishToNestedHandlers(record);
                    super.doPublish(record);
                } else {
                    // drop everything below the discard level
                    // this is not ideal, but we can run out of memory otherwise
                    // this only happens if we end up with more than 4k log messages before activation
                    if (record.getLevel().intValue() <= discardLevel) {
                        return;
                    }
                    // Determine whether the queue was overrun
                    if (logRecords.size() >= queueLimit) {
                        compactQueue();
                        reportError(
                              "The delayed handler's queue was overrun and log record(s) were lost. Did you forget to configure logging?",
                              null, ErrorManager.WRITE_FAILURE);
                        if (logRecords.size() >= queueLimit) {
                            //still too full, nothing we can do
                            return;
                        }
                    }
                    // Determine if we need to calculate the caller information before we queue the record
                    if (isCallerCalculationRequired()) {
                        // prepare record to move to another thread
                        record.copyAll();
                    } else {
                        // Disable the caller calculation since it's been determined we won't be using it
                        record.disableCallerCalculation();
                        // Copy the MDC over
                        record.copyMdc();
                    }
                    lowestInQueue = Integer.min(record.getLevel().intValue(), lowestInQueue);
                    logRecords.addLast(record);
                }
            }
        }
    }
```

Changed files:
independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/logging/QuarkusDelayedHandler.java

diff --git a/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/logging/QuarkusDelayedHandler.java b/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/logging/QuarkusDelayedHandler.java
index 3d76d98d1e4..68e308b980e 100644
--- a/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/logging/QuarkusDelayedHandler.java
+++ b/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/logging/QuarkusDelayedHandler.java
@@ -95,7 +95,6 @@ protected void doPublish(final ExtLogRecord record) {
                             //still too full, nothing we can do
                             return;
                         }
-                        return;
                     }
                     // Determine if we need to calculate the caller information before we queue the record
                     if (isCallerCalculationRequired()) {