Skip to content

Commit 0b3c093

Browse files
authored
Merge pull request #79 from configcat/evaluation-log-fix
move evaluation logs from info level to debug
2 parents bf3aefc + 5454135 commit 0b3c093

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/config_cat/rollout.ex

+5-5
Original file line numberDiff line numberDiff line change
@@ -139,23 +139,23 @@ defmodule ConfigCat.Rollout do
139139

140140
defp base_value(setting_descriptor, default_value) do
141141
result = Map.get(setting_descriptor, Constants.value(), default_value)
142-
Logger.info("Returning #{result}")
142+
Logger.debug("Returning #{result}")
143143

144144
result
145145
end
146146

147147
defp log_evaluating(key) do
148-
Logger.info("Evaluating get_value('#{key}').")
148+
Logger.debug("Evaluating get_value('#{key}').")
149149
end
150150

151151
defp log_match(comparison_attribute, user_value, comparator, comparison_value, value) do
152-
Logger.info(
152+
Logger.debug(
153153
"Evaluating rule: [#{comparison_attribute}:#{user_value}] [#{Comparator.description(comparator)}] [#{comparison_value}] => match, returning: #{value}"
154154
)
155155
end
156156

157157
defp log_no_match(comparison_attribute, user_value, comparator, comparison_value) do
158-
Logger.info(
158+
Logger.debug(
159159
"Evaluating rule: [#{comparison_attribute}:#{user_value}] [#{Comparator.description(comparator)}] [#{comparison_value}] => no match"
160160
)
161161
end
@@ -173,7 +173,7 @@ defmodule ConfigCat.Rollout do
173173
end
174174

175175
defp log_valid_user(user) do
176-
Logger.info("User object: #{inspect(user)}")
176+
Logger.debug("User object: #{inspect(user)}")
177177
end
178178

179179
defp log_nil_user(key) do

samples/multi/lib/multi/application.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ defmodule Multi.Application do
1010

1111
def start(_type, _args) do
1212

13-
# Info level logging helps to inspect the feature flag evaluation process.
13+
# Debug level logging helps to inspect the feature flag evaluation process.
1414
# Use the :warning level to avoid too detailed logging in your application.
15-
Logger.configure(level: :info)
15+
Logger.configure(level: :debug)
1616

1717
children = [
1818
Supervisor.child_spec({ConfigCat, [sdk_key: @sdk_key_1, name: :first]}, id: :config_cat_1),

samples/simple/lib/simple/application.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ defmodule Simple.Application do
99

1010
def start(_type, _args) do
1111

12-
# Info level logging helps to inspect the feature flag evaluation process.
12+
# Debug level logging helps to inspect the feature flag evaluation process.
1313
# Use the :warning level to avoid too detailed logging in your application.
14-
Logger.configure(level: :info)
14+
Logger.configure(level: :debug)
1515

1616
children = [
1717
{ConfigCat, [sdk_key: @sdk_key]},

0 commit comments

Comments
 (0)