Skip to content

Commit

Permalink
Change log level. (#9846)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-langer authored Feb 27, 2025
1 parent 5335c77 commit f3dd4f3
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit f3dd4f3

Please sign in to comment.