Skip to content

UTF-8 encoding is not enforced on all messages #180

Open
@jasonwbarnett

Description

@jasonwbarnett

Environment

Ruby v2.7.3
semantic_logger v4.7.4

Expected Behavior

I would expect that all messages logged would have UTF-8 encoding forced.

Actual Behavior

E [9051:SemanticLogger::Appenders] SemanticLogger::Appenders -- Failed to log to appender: SemanticLogger::Appender::SplunkHttp -- Exception: Encoding::UndefinedConversionError: "\xE2" from ASCII-8BIT to UTF-8
/opt/ruby/embedded/lib/ruby/gems/2.7.0/gems/semantic_logger-4.7.4/lib/semantic_logger/appender/splunk_http.rb:102:in `to_json'
/opt/ruby/embedded/lib/ruby/gems/2.7.0/gems/semantic_logger-4.7.4/lib/semantic_logger/appender/splunk_http.rb:102:in `call'
/opt/ruby/embedded/lib/ruby/gems/2.7.0/gems/semantic_logger-4.7.4/lib/semantic_logger/appender/http.rb:165:in `log'
/opt/ruby/embedded/lib/ruby/gems/2.7.0/gems/semantic_logger-4.7.4/lib/semantic_logger/appenders.rb:20:in `block in log'
/opt/ruby/embedded/lib/ruby/gems/2.7.0/gems/semantic_logger-4.7.4/lib/semantic_logger/appenders.rb:18:in `each'
/opt/ruby/embedded/lib/ruby/gems/2.7.0/gems/semantic_logger-4.7.4/lib/semantic_logger/appenders.rb:18:in `log'
/opt/ruby/embedded/lib/ruby/gems/2.7.0/gems/semantic_logger-4.7.4/lib/semantic_logger/appender/async.rb:152:in `process_messages'
/opt/ruby/embedded/lib/ruby/gems/2.7.0/gems/semantic_logger-4.7.4/lib/semantic_logger/appender/async.rb:121:in `process'
/opt/ruby/embedded/lib/ruby/gems/2.7.0/gems/semantic_logger-4.7.4/lib/semantic_logger/appender/async.rb:77:in `block in thread'

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions