Skip to content

Commit 114f914

Browse files
authored
Update README.md to use log_level env var
1 parent 5b48391 commit 114f914

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ For example, adding these lines to `config/application.rb` and removing any othe
1818
# Setup structured logging
1919
config.semantic_logger.application = "my_application"
2020
config.semantic_logger.environment = ENV["STACK_NAME"] || Rails.env
21+
config.log_level = ENV["LOG_LEVEL"] || :info
2122

2223
# Switch to JSON Logging output to stdout when running on Kubernetes
2324
if ENV["LOG_TO_CONSOLE"] || ENV["KUBERNETES_SERVICE_HOST"]
2425
config.rails_semantic_logger.add_file_appender = false
25-
config.semantic_logger.add_appender(io: $stdout, level: ENV["LOG_LEVEL"] || config.log_level, formatter: :json)
26+
config.semantic_logger.add_appender(io: $stdout, formatter: :json)
2627
end
2728
~~~
2829

0 commit comments

Comments
 (0)