Semantic Logger v4.0.0 Release Notes

Release Date: 2017-03-02 // about 7 years ago
  • โž• Added

    • ๐ŸŒฒ #backtrace to log the backtrace for a thread.
    • ๐ŸŒฒ named_tags to support hash like tagging of log messages.

    ๐Ÿ”„ Changed

    • ๐Ÿ’Ž Ruby V2.1 is now the minimum runtime version.
    • ๐ŸŽ Switch from Hash arguments to Ruby keyword arguments, for better performance, validation and defaults.
    • ๐Ÿ›ฐ Replaced Logger#with_payload with SemanticLogger.named_tagged.
    • ๐Ÿ›ฐ Replaced Logger#payload with SemanticLogger.named_tags.
    • ๐Ÿ›ฐ Any payload elements passed into the log line must now be specified in a separate :payload tag.

      • For example any occurrences of: ~~~ruby logger.error(message: 'Hello', response: response_message) ~~~
      • Must be changed to use the payload tag:
      logger.error(message: 'Hello', payload: {response: response_message} )
      
      • Otherwise Ruby will raise the following error:
      ArgumentError: unknown keywords: response
      semantic_logger/lib/semantic_logger/log.rb:65:in `assign'
      
    • ๐Ÿ”€ For JSON and Hash appender format, payload is now in its own :payload tag instead of being merged into the hash.

    • Text and Color formatters now include named_tags in their output.

    • โฌ†๏ธ MongoDB Appender has been upgraded to support Mongo Ruby Client V2.

    • Replaced hash arguments with keyword arguments.

      • For example, the Bugsnag Appender now only accepts the level as follows: ๐Ÿ’Ž ~~~ruby SemanticLogger::Appender::Bugsnag.new(level: :info) ~~~

    ๐Ÿ›  Fixed

    • ๐Ÿ‘ป Graylog appender when logger is called with only an exception object.
    • ๐Ÿ’Ž During a backtrace dump, include the current thread on Ruby MRI.

    โฌ‡๏ธ Dropped Support for

    • ๐Ÿš… Rails 3.2
    • ๐Ÿ’Ž Ruby 1.9 & 2.0
    • ๐Ÿ’Ž JRuby 1.7