reidmorrison / semantic_logger

Semantic Logger is a feature rich logging framework, and replacement for existing Ruby & Rails loggers.
https://logger.rocketjob.io/
Apache License 2.0
873 stars 124 forks source link

Exception: NoMethodError: undefined method `[]' for nil #285

Closed srajan-dadhich closed 5 months ago

srajan-dadhich commented 5 months ago

Environment

Provide at least:

case Rails.application.config.log_destination when :stdout SemanticLogger.add_appender(io: STDOUT, semantic_appender_options) when :file path = Rails.root.join("log", "railslogger#{Rails.env}.json").to_s SemanticLogger.add_appender(file_name: path, semantic_appender_options) else raise NotImplementedError("Invalid log_destination #{Rails.application.config.log_destination}") end

Rails.logger.level = Rails.application.config.log_level`

Note:

Expected Behavior

Actual Behavior

reidmorrison commented 5 months ago

Thank you for reporting the full stack trace, made it simple to isolate and add handling.