All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added
with_level
method for compatibility with the latest standard library logger gem.
- Fixed typo in magic frozen string literal comments. (thanks @andyw8 and @steveclarke)
- Allow passing in formatters as class names when adding them.
- Allow passing in formatters initialization arguments when adding them.
- Add truncate formatter for capping the length of log messages.
- Add
Logger#untagged
to remove previously set logging tags from a block. - Return result of the block when a block is passed to
Logger#tag
.
- Allow passing frozen hashes to
Logger#tag
. Tags passed to this method are now duplicated so the logger maintains it's own copy of the hash.
- Add Logger#remove_tag
- Fix
Logger#tag
so it only ads to the current block's logger tags instead of the global tags if called inside aLogger#tag
block.
- Add support for bang methods (error!) for setting the log level.
- Fixed logic with recursive reference guard in StructuredFormatter so it only suppresses Enumerable references.
- Enhance
ActiveSupport::TaggedLogging
support so code that Lumberjack loggers can be wrapped with a tagged logger.
- Fix structured formatter so no-recursive, duplicate references are allowed.
- Prevent infinite loops in the structured formatter where objects have backreferences to each other.
- Prevent infinite loops where logging a statement triggers the logger.
- Enable compatibility with
ActiveSupport::TaggedLogger
by callingtagged_logger!
on a logger. - Add
tag_formatter
to logger to specify formatting of tags for output. - Allow adding and removing classes by name to formatters.
- Allow adding and removing multiple classes in a single call to a formatter.
- Allow using symbols and strings as log level for silencing a logger.
- Ensure flusher thread gets stopped when logger is closed.
- Add writer for logger device attribute.
- Handle passing an array of devices to a multi device.
- Helper method to get a tag with a specified name.
- Add strip formatter to strip whitespace from strings.
- Support non-alpha numeric characters in template variables.
- Add backtrace cleaner to ExceptionFormatter.
- Replace Procs in tag values with the value of calling the Proc in log entries.
- Change
Lumberjack::Logger
to inherit from ::Logger - Add support for tags on log messages
- Add global tag context for all loggers
- Add per logger tags and tag contexts
- Reimplement unit of work id as a tag on log entries
- Add support for setting datetime format on log devices
- Performance optimizations
- Add Multi device to output to multiple devices
- Add
DateTimeFormatter
,IdFormatter
,ObjectFormatter
, andStructuredFormatter
- Add rack
Context
middleware for setting thread global context - Add support for modules in formatters
- End support for ruby versions < 2.3
- Added
:min_roll_check
option toLumberjack::Device::RollingLogFile
to reduce file system checks. Default is now to only check if a file needs to be rolled at most once per second. - Force immutable strings for Ruby versions that support them.
- Reduce amount of code executed inside a mutex lock when writing to the logger stream.
- Add support for
ActionDispatch
request id for better Rails compatibility.
- Fix Ruby 2.4 deprecation warning on Fixnum (thanks @koic).
- Fix gemspec files to be flat array (thanks @e2).
- Expose option to manually roll log files.
- Minor code cleanup.
- Add method so Formatter is compatible with
ActiveSupport
logging extensions.
- Fix another internal variable name conflict with
ActiveSupport
logging extensions.
- Fix broken formatter attribute method.
- Fix internal variable name conflict with
ActiveSupport
logging extensions.
- Update docs.
- Remove autoload calls to make thread safe.
- Make compatible with Ruby 2.1.1 Pathname.
- Make compatible with standard library Logger's use of progname as default message.
- Add ability to supply a unit of work id for a block instead of having one generated every time.
- Change log file output format to binary to avoid encoding warnings.
- Fixed bug in log file rolling that left the file locked.
- Remove deprecation warnings under ruby 1.9.3.
- Add more error checking around file rolling.
- Writes are no longer buffered by default.
- Initial release