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

fixes #323 Add info log and trace log in the OpenApiHandler contructor #324

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public class OpenApiHandler implements MiddlewareHandler {
private volatile HttpHandler next;

public OpenApiHandler(OpenApiHandlerConfig cfg) {
if(logger.isInfoEnabled()) logger.info("OpenApiHandler is constructed with cfg.");
config = cfg;
Map<String, Object> inject = Config.getInstance().getJsonMapConfig(SPEC_INJECT);

Expand Down Expand Up @@ -108,6 +109,7 @@ public OpenApiHandler(OpenApiHandlerConfig cfg) {
throw new RuntimeException("merge specification failed for " + entry.getValue());
}
}
if(logger.isTraceEnabled()) logger.trace("multiple specifications loaded.");
} else {
Map<String, Object> openapi = Config.getInstance().getJsonMapConfigNoCache(CONFIG_NAME);
handlerConfig = (HandlerConfig) Config.getInstance().getJsonObjectConfig(HANDLER_CONFIG, HandlerConfig.class);
Expand All @@ -128,6 +130,7 @@ public OpenApiHandler(OpenApiHandlerConfig cfg) {
logger.error("merge specification failed");
throw new RuntimeException("merge specification failed");
}
if(logger.isTraceEnabled()) logger.trace("single specification loaded.");
}
}

Expand Down