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

4.x: CORS support helper change log level. #9846

Merged
merged 1 commit into from
Feb 27, 2025
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
Change log level.
  • Loading branch information
tomas-langer committed Feb 26, 2025
commit 804436b15dfa76fa1b57dc670362aaf2328d3187
9 changes: 5 additions & 4 deletions cors/src/main/java/io/helidon/cors/CorsSupportHelper.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2024 Oracle and/or its affiliates.
* Copyright (c) 2020, 2025 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -52,7 +52,6 @@
*/
public class CorsSupportHelper<Q, R> {

static final int SUCCESS_RANGE = 300;
static final String ORIGIN_DENIED = "CORS origin is denied";
static final String ORIGIN_NOT_IN_ALLOWED_LIST = "CORS origin is not in allowed list";
static final String METHOD_NOT_IN_ALLOWED_LIST = "CORS method is not in allowed list";
Expand Down Expand Up @@ -239,8 +238,10 @@ public CorsSupportHelper<Q, R> build() {

CorsSupportHelper<Q, R> result = new CorsSupportHelper<>(this);

LOGGER.log(System.Logger.Level.INFO,
() -> String.format("CorsSupportHelper configured as: %s", result.toString()));
if (LOGGER.isLoggable(System.Logger.Level.DEBUG)) {
LOGGER.log(System.Logger.Level.DEBUG,
() -> String.format("CorsSupportHelper configured as: %s", result));
}

return result;
}
Expand Down
Loading