Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce DeltaHandler logs for not found collections #373

Closed
mcweba opened this issue Jun 8, 2021 · 1 comment
Closed

Reduce DeltaHandler logs for not found collections #373

mcweba opened this issue Jun 8, 2021 · 1 comment

Comments

@mcweba
Copy link
Collaborator

mcweba commented Jun 8, 2021

When making delta requests to a collection which does not exist, the following error is logged correctly:

2021-06-08 08:51:46,612 vnecri2 int  crush ERROR DeltaHandler - YL8Tgt7UPkSYyLF72OnNegAALQU Failed to handle get for collection

However, also the stacktrace of the corresponding ResourceCollectionException is logged.

Example:

org.swisspush.gateleen.core.util.ResourceCollectionException: Not Found
	at org.swisspush.gateleen.core.util.ExpansionDeltaUtil.checkResponse(ExpansionDeltaUtil.java:254)
	at org.swisspush.gateleen.core.util.ExpansionDeltaUtil.verifyCollectionResponse(ExpansionDeltaUtil.java:219)
	at org.swisspush.gateleen.delta.DeltaHandler.lambda$null$10(DeltaHandler.java:252)
	at org.swisspush.gateleen.core.http.LocalHttpServerResponse$1.lambda$bodyHandler$0(LocalHttpServerResponse.java:69)
	at org.swisspush.gateleen.core.http.BufferBridge.doEnd(BufferBridge.java:75)
	at org.swisspush.gateleen.core.http.LocalHttpServerResponse.end(LocalHttpServerResponse.java:269)
	at org.swisspush.gateleen.routing.StorageForwarder.lambda$null$1(StorageForwarder.java:141)
	at io.vertx.core.eventbus.impl.EventBusImpl.lambda$convertHandler$3(EventBusImpl.java:348)
	at io.vertx.core.eventbus.impl.HandlerRegistration.deliver(HandlerRegistration.java:261)
	at io.vertx.core.eventbus.impl.HandlerRegistration.handle(HandlerRegistration.java:239)
	at io.vertx.core.eventbus.impl.EventBusImpl$InboundDeliveryContext.next(EventBusImpl.java:565)
	at io.vertx.core.eventbus.impl.EventBusImpl.lambda$deliverToHandler$5(EventBusImpl.java:524)
	at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:320)
	at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)

This results in lots of unnecessary log statements.

Solution
Do not log exception when the response status code is 404 Not Found. Also change the type of the log from ERROR to INFO in this case.

mcweba added a commit that referenced this issue Jun 9, 2021
…lso do not log the stacktrace in this case
mcweba added a commit that referenced this issue Jun 9, 2021
#373 changed log type from error to info for not-found collections. A…
@mcweba
Copy link
Collaborator Author

mcweba commented Jun 9, 2021

Fixed in version v1.1.70

@mcweba mcweba closed this as completed Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant