lumberjack 1.2.7 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/ARCHITECTURE.md +244 -0
  3. data/CHANGELOG.md +251 -56
  4. data/README.md +197 -62
  5. data/VERSION +1 -1
  6. data/lib/lumberjack/context.rb +25 -5
  7. data/lib/lumberjack/device/date_rolling_log_file.rb +17 -8
  8. data/lib/lumberjack/device/log_file.rb +14 -7
  9. data/lib/lumberjack/device/multi.rb +8 -7
  10. data/lib/lumberjack/device/null.rb +2 -2
  11. data/lib/lumberjack/device/rolling_log_file.rb +46 -22
  12. data/lib/lumberjack/device/size_rolling_log_file.rb +10 -10
  13. data/lib/lumberjack/device/writer.rb +45 -21
  14. data/lib/lumberjack/device.rb +28 -13
  15. data/lib/lumberjack/formatter/date_time_formatter.rb +5 -5
  16. data/lib/lumberjack/formatter/exception_formatter.rb +4 -4
  17. data/lib/lumberjack/formatter/id_formatter.rb +4 -3
  18. data/lib/lumberjack/formatter/inspect_formatter.rb +1 -1
  19. data/lib/lumberjack/formatter/multiply_formatter.rb +25 -0
  20. data/lib/lumberjack/formatter/object_formatter.rb +1 -1
  21. data/lib/lumberjack/formatter/pretty_print_formatter.rb +7 -5
  22. data/lib/lumberjack/formatter/redact_formatter.rb +23 -0
  23. data/lib/lumberjack/formatter/round_formatter.rb +21 -0
  24. data/lib/lumberjack/formatter/string_formatter.rb +1 -1
  25. data/lib/lumberjack/formatter/strip_formatter.rb +1 -1
  26. data/lib/lumberjack/formatter/structured_formatter.rb +3 -1
  27. data/lib/lumberjack/formatter/tagged_message.rb +39 -0
  28. data/lib/lumberjack/formatter/truncate_formatter.rb +27 -0
  29. data/lib/lumberjack/formatter.rb +96 -28
  30. data/lib/lumberjack/log_entry.rb +90 -19
  31. data/lib/lumberjack/logger.rb +318 -86
  32. data/lib/lumberjack/rack/context.rb +21 -2
  33. data/lib/lumberjack/rack/request_id.rb +8 -4
  34. data/lib/lumberjack/rack/unit_of_work.rb +7 -3
  35. data/lib/lumberjack/rack.rb +4 -4
  36. data/lib/lumberjack/severity.rb +22 -3
  37. data/lib/lumberjack/tag_context.rb +78 -0
  38. data/lib/lumberjack/tag_formatter.rb +124 -25
  39. data/lib/lumberjack/tagged_logger_support.rb +26 -12
  40. data/lib/lumberjack/tagged_logging.rb +1 -1
  41. data/lib/lumberjack/tags.rb +8 -8
  42. data/lib/lumberjack/template.rb +17 -5
  43. data/lib/lumberjack/utils.rb +182 -0
  44. data/lib/lumberjack.rb +64 -35
  45. data/lumberjack.gemspec +18 -15
  46. metadata +23 -54
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ba28430c423311445a80559e0bd6fdfbfdfed90edcd4dda89d9e5d635d75ec9
4
- data.tar.gz: 5507d016ad2b7dcf13e38616496e2b9e5c18e456eb1ad6bdfeceb66386eae403
3
+ metadata.gz: 02eeeab48546eb4e180fbb933e3de684a77fea0c450589df6dd61ddcf2cb222f
4
+ data.tar.gz: b6e3f8e910101ca39422473da6aa83f1de2ee47fbb124319008f0abebfef30d0
5
5
  SHA512:
6
- metadata.gz: 7bf2c9640012487f994d8e4eaabf85e9b4a3fbae828d0a0bccab71cfa7af8820da199b72d04764db4b6d9e7439ac620f49578b0a20b8c77c01f4ea496616ff4c
7
- data.tar.gz: fb7d9b44ca1bbbd1a2727252c5b9f8885f8a374cd24e0fa34f38b9fca2cfa0444d603d15ccdec743c247251c0622d9153ecbe1b0d9c609da24b38511957ba190
6
+ metadata.gz: 28db09d28e5165583d07f41b08259223eca744ec51a5bf07a8dfcc9f6f457e6e8c31da9ccef79d71aa95db3e86c337e03f050c4f36dd6fc04f13c924669cd0db
7
+ data.tar.gz: 3f5d888d77f72b28ae3bf974e45d662c832a1148797955c4263e484825628231297deb18e12d3cc51c3b84555240cde2a63cacb1ff0b4a603950b550eeb7d3d8
data/ARCHITECTURE.md ADDED
@@ -0,0 +1,244 @@
1
+ # Lumberjack Gem Architecture
2
+
3
+ Lumberjack is a simple, powerful, and fast logging implementation in Ruby. It uses nearly the same API as the Logger class in the Ruby standard library and as ActiveSupport::BufferedLogger in Rails. The gem is designed with structured logging in mind, but can be used for simple text logging as well.
4
+
5
+ ## Overview
6
+
7
+ The Lumberjack architecture follows a clean separation of concerns with the following main components:
8
+
9
+ - **Logger**: The main interface for creating log entries
10
+ - **LogEntry**: Data structure that captures log messages and metadata
11
+ - **Device**: Abstraction for different output destinations
12
+ - **Formatter**: Handles message formatting and transformation
13
+ - **TagFormatter**: Specialized formatting for tags
14
+ - **Template**: Template engine for customizing log output format
15
+ - **Context**: Thread-local context for managing tags across log entries
16
+ - **Severity**: Log level management and filtering
17
+
18
+ ## Core Architecture
19
+
20
+ ```mermaid
21
+ classDiagram
22
+ class Logger {
23
+ +Device device
24
+ +Formatter formatter
25
+ +TagFormatter tag_formatter
26
+ +Integer level
27
+ +String progname
28
+ +Hash tags
29
+ +initialize(device, options)
30
+ +debug(message, progname, tags)
31
+ +info(message, progname, tags)
32
+ +warn(message, progname, tags)
33
+ +error(message, progname, tags)
34
+ +fatal(message, progname, tags)
35
+ +add_entry(severity, message, progname, tags)
36
+ +tag(tags_hash)
37
+ +flush()
38
+ +close()
39
+ }
40
+
41
+ class LogEntry {
42
+ +Time time
43
+ +Integer severity
44
+ +Object message
45
+ +String progname
46
+ +Integer pid
47
+ +Hash tags
48
+ +initialize(time, severity, message, progname, pid, tags)
49
+ +severity_label()
50
+ +tag(name)
51
+ +to_s()
52
+ }
53
+
54
+ class Device {
55
+ <<abstract>>
56
+ +write(entry)*
57
+ +flush()
58
+ +close()
59
+ +reopen()
60
+ +datetime_format()
61
+ +datetime_format=(format)
62
+ }
63
+
64
+ class Formatter {
65
+ +Hash class_formatters
66
+ +Hash module_formatters
67
+ +add(classes, formatter)
68
+ +remove(classes)
69
+ +format(message)
70
+ +clear()
71
+ }
72
+
73
+ class TagFormatter {
74
+ +Hash formatters
75
+ +Object default_formatter
76
+ +default(formatter)
77
+ +add(names, formatter)
78
+ +remove(names)
79
+ +format(tags)
80
+ +clear()
81
+ }
82
+
83
+ class Template {
84
+ +String first_line_template
85
+ +String additional_line_template
86
+ +String datetime_format
87
+ +compile(template)
88
+ +call(entry)
89
+ +datetime_format=(format)
90
+ }
91
+
92
+ class Context {
93
+ +Hash tags
94
+ +initialize(parent_context)
95
+ +tag(tags)
96
+ +\[](key)
97
+ +\[]=(key, value)
98
+ +reset()
99
+ }
100
+
101
+ class Severity {
102
+ <<module>>
103
+ +level_to_label(severity)
104
+ +label_to_level(label)
105
+ +coerce(value)
106
+ }
107
+
108
+ Logger --> LogEntry : creates
109
+ Logger --> Device : writes to
110
+ Logger --> Formatter : uses
111
+ Logger --> TagFormatter : uses
112
+ Logger --> Severity : includes
113
+ Device --> Template : may use
114
+ Formatter --> LogEntry : formats message
115
+ TagFormatter --> LogEntry : formats tags
116
+ Logger <-- Context : provides tags
117
+ ```
118
+
119
+ ## Device Hierarchy
120
+
121
+ The Device system provides a pluggable architecture for different output destinations:
122
+
123
+ ```mermaid
124
+ classDiagram
125
+ class Device {
126
+ <<abstract>>
127
+ +write(entry)*
128
+ +flush()
129
+ +close()
130
+ +reopen()
131
+ }
132
+
133
+ class Writer {
134
+ +IO stream
135
+ +Template template
136
+ +Buffer buffer
137
+ +Integer buffer_size
138
+ +write(entry)
139
+ +flush()
140
+ +before_flush()
141
+ }
142
+
143
+ class LogFile {
144
+ +String file_path
145
+ +write(entry)
146
+ +reopen(file_path)
147
+ +close()
148
+ }
149
+
150
+ class RollingLogFile {
151
+ <<abstract>>
152
+ +roll_file?()
153
+ +roll_file!()
154
+ +archive_file_suffix()
155
+ }
156
+
157
+ class DateRollingLogFile {
158
+ +String roll
159
+ +roll_file?()
160
+ +archive_file_suffix()
161
+ }
162
+
163
+ class SizeRollingLogFile {
164
+ +Integer max_size
165
+ +Integer keep
166
+ +roll_file?()
167
+ +archive_file_suffix()
168
+ }
169
+
170
+ class Multi {
171
+ +Array~Device~ devices
172
+ +write(entry)
173
+ +flush()
174
+ +close()
175
+ }
176
+
177
+ class Null {
178
+ +write(entry)
179
+ }
180
+
181
+ Device <|-- Writer
182
+ Device <|-- Multi
183
+ Device <|-- Null
184
+ Writer <|-- LogFile
185
+ LogFile <|-- RollingLogFile
186
+ RollingLogFile <|-- DateRollingLogFile
187
+ RollingLogFile <|-- SizeRollingLogFile
188
+ Multi --> Device : contains multiple
189
+ ```
190
+
191
+ ## Data Flow
192
+
193
+ The logging process follows this flow:
194
+
195
+ ```mermaid
196
+ sequenceDiagram
197
+ participant Client
198
+ participant Logger
199
+ participant Formatter
200
+ participant TagFormatter
201
+ participant LogEntry
202
+ participant Device
203
+ participant Template
204
+
205
+ Client->>Logger: info("message", tags: {key: value})
206
+ Logger->>Logger: Check severity level
207
+ Logger->>Formatter: format(message)
208
+ Formatter-->>Logger: formatted_message
209
+ Logger->>TagFormatter: format(tags)
210
+ TagFormatter-->>Logger: formatted_tags
211
+ Logger->>LogEntry: new(time, severity, message, progname, pid, tags)
212
+ LogEntry-->>Logger: log_entry
213
+ Logger->>Device: write(log_entry)
214
+ Device->>Template: call(log_entry) [if Writer device]
215
+ Template-->>Device: formatted_string
216
+ Device->>Device: Write to output destination
217
+ ```
218
+
219
+ ## Key Features
220
+
221
+ ### Thread Safety
222
+ - Logger operations are thread-safe
223
+ - Context provides thread-local tag storage
224
+ - Devices handle concurrent writes appropriately
225
+
226
+ ### Structured Logging
227
+ - LogEntry captures structured data beyond just the message
228
+ - Tags provide key-value metadata
229
+ - Formatters can handle complex object serialization
230
+
231
+ ### Pluggable Architecture
232
+ - Device abstraction allows custom output destinations
233
+ - Formatter system enables custom message transformation
234
+ - TagFormatter provides specialized tag handling
235
+
236
+ ### Performance Optimization
237
+ - Buffered writing in Writer devices
238
+ - Lazy evaluation of expensive operations
239
+ - Configurable flush intervals
240
+
241
+ ### ActiveSupport Compatibility
242
+ - TaggedLoggerSupport module provides Rails compatibility
243
+ - Compatible API with standard library Logger
244
+ - Supports ActiveSupport::TaggedLogging interface
data/CHANGELOG.md CHANGED
@@ -1,124 +1,319 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## 1.4.2
8
+
9
+ ### Fixed
10
+
11
+ - Fixed issue where calling `Lumberjack::LogEntry#tag` would raise an error if there were no tags set on the log entry.
12
+
13
+ ## 1.4.1
14
+
15
+ ### Changed
16
+
17
+ - Catch errors when formatting values so that it doesn't prevent logging. Otherwise there can be no way to log that the error occurred. Values that produced errors in the formatter will now be shown in the logs as "<Error formatting CLASS_NAME: ERROR_CLASS ERROR_MESSAGE>".
18
+
19
+ ## 1.4.0
20
+
21
+ ### Changed
22
+
23
+ - Tags are consistently flattened internally to dot notation keys. This makes tag handling more consistent when using nested hashes as tag values. This changes how nested tags are merged, though. Now when new nested tags are set they will be merged into the existing tags rather than replacing them entirely. So `logger.tag(foo: {bar: "baz"})` will now merge the `foo.bar` tag into the existing tags rather than replacing the entire `foo` tag.
24
+ - The `Lumberjack::Logger#context` method can now be called without a block. When called with a block it sets up a new tag context for the block. When called without a block, it returns the current tag context in a `Lumberjack::TagContext` object which can be used to add tags to the current context.
25
+ - Tags in `Lumberjack::LogEntry` are now always stored as a hash of flattened keys. This means that when tags are set on a log entry, they will be automatically flattened to dot notation keys. The `tag` method will return a hash of sub-tags if the tag name is a tag prefix.
26
+
27
+ ### Added
28
+
29
+ - Added `Lumberjack::LogEntry#nested_tags` method to return the tags as a nested hash structure.
30
+
31
+ ## 1.3.4
32
+
33
+ ### Added
34
+
35
+ - Added `Lumberjack::Logger#with_progname` alias for `set_progname` to match the naming convention used for setting temporary levels.
36
+
37
+ ### Fixed
38
+
39
+ - Ensure that the safety check for circular calls to `Lumberjack::Logger#add_entry` cannot lose state.
40
+
41
+ ## 1.3.3
42
+
43
+ ### Added
44
+
45
+ - Added `Lumberjack::Utils#expand_tags` method to expand a hash of tags that may contain nested hashes or dot notation keys.
46
+
47
+ ### Changed
48
+
49
+ - Updated `Lumberjack::Utils#flatten_tags` to convert all keys to strings.
50
+
51
+ ## 1.3.2
52
+
53
+ ### Fixed
54
+
55
+ - Fixed `NoMethodError` when setting the device via the `Lumberjack::Logger#device=` method.
56
+
57
+ ## 1.3.1
58
+
59
+ ### Added
60
+
61
+ - Added `Lumberjack::Logger#context` method to set up a context block for the logger. This is the same as calling `Lumberjack::Logger#tag` with an empty hash.
62
+ - Log entries now remove empty tag values so they don't have to be removed downstream.
63
+
64
+ ### Fixed
65
+
66
+ - ActiveSupport::TaggedLogger now calls `Lumberjack::Logger#tag_globally` to prevent deprecation warnings.
67
+
68
+ ## 1.3.0
69
+
70
+ ### Added
71
+
72
+ - Added `Lumberjack::Formatter::TaggedMessage` to allow extracting tags from log messages via a formatter in order to better support structured logging of objects.
73
+ - Added built in `:round` formatter to round numbers to a specified number of decimal places.
74
+ - Added built in `:redact` formatter to redact sensitive information from log tags.
75
+ - Added support in `Lumberjack::TagFormatter` for class formatters. Class formatters will be applied to any tag values that match the class.
76
+ - Apply formatters to enumerable values in tags. Name formatters are applied using dot syntax when a tag value contains a hash.
77
+ - Added support for a dedicated message formatter that can override the default formatter on the log message.
78
+ - Added support for setting tags from the request environment in `Lumberjack::Rack::Context` middleware.
79
+ - Added helper methods to generate global PID's and thread ids.
80
+ - Added `Lumberjack::Logger#tag_globally` to explicitly set a global tag for all loggers.
81
+ - Added `Lumberjack::Logger#tag_value` to get the value of a tag by name from the current tag context.
82
+ - Added `Lumberjack::Utils.hostname` to get the hostname in UTF-8 encoding.
83
+ - Added `Lumberjack::Utils.global_pid` to get a global process id in a consistent format.
84
+ - Added `Lumberjack::Utils.global_thread_id` to get a thread id in a consistent format.
85
+ - Added `Lumberjack::Utils.thread_name` to get a thread name in a consistent format.
86
+ - Added support for `ActiveSupport::Logging.logger_outputs_to?` to check if a logger is outputting to a specific IO stream.
87
+ - Added `Lumberjack::Logger#log_at` method to temporarily set the log level for a block of code for compatibility with ActiveSupport loggers.
88
+
89
+ ### Changed
90
+
91
+ - Default date/time format for log entries is now ISO-8601 with microsecond precision.
92
+ - Tags that are set to hash values will now be flattened into dot-separated keys in templates.
93
+
94
+ ### Removed
95
+
96
+ - Removed support for Ruby versions < 2.5.
97
+
98
+ ### Deprecated
99
+
100
+ - All unit of work related functionality from version 1.0 has been officially deprecated and will be removed in version 2.0. Use tags instead to set a global context for log entries.
101
+ - Calling `Lumberjack::Logger#tag` without a block is deprecated. Use `Lumberjack::Logger#tag_globally` instead.
102
+
103
+ ## 1.2.10
104
+
105
+ ### Added
106
+
107
+ - Added `with_level` method for compatibility with the latest standard library logger gem.
108
+
109
+ ### Fixed
110
+
111
+ - Fixed typo in magic frozen string literal comments. (thanks @andyw8 and @steveclarke)
112
+
113
+ ## 1.2.9
114
+
115
+ ### Added
116
+
117
+ - Allow passing in formatters as class names when adding them.
118
+ - Allow passing in formatters initialization arguments when adding them.
119
+ - Add truncate formatter for capping the length of log messages.
120
+
121
+ ## 1.2.8
122
+
123
+ ### Added
124
+
125
+ - Add `Logger#untagged` to remove previously set logging tags from a block.
126
+ - Return result of the block when a block is passed to `Logger#tag`.
127
+
1
128
  ## 1.2.7
2
129
 
3
- * 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.
130
+ ### Fixed
131
+
132
+ - 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.
4
133
 
5
134
  ## 1.2.6
6
135
 
7
- * Fix Logger#tag so it only ads to the current block's logger tags instead of the global tags if called inside a `Logger#tag` block.
8
- * Add Logger#remove_tag
136
+ ### Added
137
+
138
+ - Add Logger#remove_tag
139
+
140
+ ### Fixed
141
+
142
+ - Fix `Logger#tag` so it only ads to the current block's logger tags instead of the global tags if called inside a `Logger#tag` block.
143
+
9
144
 
10
145
  ## 1.2.5
11
146
 
12
- * Fix logic with recursive reference guard in StructuredFormatter so it only suppresses Enumerable references.
13
- * Add support for bang methods (error!) for setting the log level.
147
+ ### Added
148
+
149
+ - Add support for bang methods (error!) for setting the log level.
150
+
151
+ ### Fixed
152
+
153
+ - Fixed logic with recursive reference guard in StructuredFormatter so it only suppresses Enumerable references.
14
154
 
15
155
  ## 1.2.4
16
156
 
17
- * Enhance ActiveSupport::TaggedLogging support so code that Lumberjack loggers can be wrapped with a tagged logger.
157
+ ### Added
158
+
159
+ - Enhance `ActiveSupport::TaggedLogging` support so code that Lumberjack loggers can be wrapped with a tagged logger.
18
160
 
19
161
  ## 1.2.3
20
162
 
21
- * Fix structured formatter so no-recursive, duplicate references are allowed.
163
+ ### Fixed
164
+
165
+ - Fix structured formatter so no-recursive, duplicate references are allowed.
22
166
 
23
167
  ## 1.2.2
24
168
 
25
- * Prevent infinite loops in the structured formatter where objects have backreferences to each other.
169
+ ### Fixed
170
+
171
+ - Prevent infinite loops in the structured formatter where objects have backreferences to each other.
26
172
 
27
173
  ## 1.2.1
28
174
 
29
- * Prevent infinite loops where logging a statement triggers the logger.
175
+ ### Fixed
176
+
177
+ - Prevent infinite loops where logging a statement triggers the logger.
30
178
 
31
179
  ## 1.2.0
32
180
 
33
- * Enable compatibility with ActiveSupport::TaggedLogger by calling `tagged_logger!` on a logger.
34
- * Add `tag_formatter` to logger to specify formatting of tags for output.
35
- * Allow adding and removing classes by name to formatters.
36
- * Allow adding and removing multiple classes in a single call to a formatter.
37
- * Allow using symbols and strings as log level for silencing a logger.
38
- * Ensure flusher thread gets stopped when logger is closed.
39
- * Add writer for logger device attribute.
40
- * Handle passing an array of devices to a multi device.
41
- * Helper method to get a tag with a specified name.
42
- * Add strip formatter to strip whitespace from strings.
43
- * Support non-alpha numeric characters in template variables.
44
- * Add backtrace cleaner to ExceptionFormatter.
181
+ ### Added
182
+
183
+ - Enable compatibility with `ActiveSupport::TaggedLogger` by calling `tagged_logger!` on a logger.
184
+ - Add `tag_formatter` to logger to specify formatting of tags for output.
185
+ - Allow adding and removing classes by name to formatters.
186
+ - Allow adding and removing multiple classes in a single call to a formatter.
187
+ - Allow using symbols and strings as log level for silencing a logger.
188
+ - Ensure flusher thread gets stopped when logger is closed.
189
+ - Add writer for logger device attribute.
190
+ - Handle passing an array of devices to a multi device.
191
+ - Helper method to get a tag with a specified name.
192
+ - Add strip formatter to strip whitespace from strings.
193
+ - Support non-alpha numeric characters in template variables.
194
+ - Add backtrace cleaner to ExceptionFormatter.
45
195
 
46
196
  ## 1.1.1
47
197
 
48
- * Replace Procs in tag values with the value of calling the Proc in log entries.
198
+ ### Added
199
+
200
+ - Replace Procs in tag values with the value of calling the Proc in log entries.
49
201
 
50
202
  ## 1.1.0
51
203
 
52
- * Change Lumberjack::Logger to inherit from ::Logger
53
- * Add support for tags on log messages
54
- * Add global tag context for all loggers
55
- * Add per logger tags and tag contexts
56
- * Reimplement unit of work id as a tag on log entries
57
- * Add support for setting datetime format on log devices
58
- * Performance optimizations
59
- * Add Multi device to output to multiple devices
60
- * Add DateTimeFormatter, IdFormatter, ObjectFormatter, and StructuredFormatter
61
- * Add rack Context middleware for setting thread global context
62
- * End support for ruby versions < 2.3
63
- * Add support for modules in formatters
204
+ ### Added
205
+
206
+ - Change `Lumberjack::Logger` to inherit from ::Logger
207
+ - Add support for tags on log messages
208
+ - Add global tag context for all loggers
209
+ - Add per logger tags and tag contexts
210
+ - Reimplement unit of work id as a tag on log entries
211
+ - Add support for setting datetime format on log devices
212
+ - Performance optimizations
213
+ - Add Multi device to output to multiple devices
214
+ - Add `DateTimeFormatter`, `IdFormatter`, `ObjectFormatter`, and `StructuredFormatter`
215
+ - Add rack `Context` middleware for setting thread global context
216
+ - Add support for modules in formatters
217
+
218
+ ### Removed
219
+
220
+ - End support for ruby versions < 2.3
64
221
 
65
222
  ## 1.0.13
66
223
 
67
- * Reduce amount of code executed inside a mutex lock when writing to the logger stream.
68
- * Added `:min_roll_check` option to `Lumberjack::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.
69
- * Force immutable strings for Ruby versions that support them.
224
+ ### Added
225
+
226
+ - Added `:min_roll_check` option to `Lumberjack::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.
227
+ - Force immutable strings for Ruby versions that support them.
228
+
229
+ ### Changed
230
+
231
+ - Reduce amount of code executed inside a mutex lock when writing to the logger stream.
70
232
 
71
233
  ## 1.0.12
72
234
 
73
- * Add support for ActionDispatch request id for better Rails compatibility.
235
+ ### Added
236
+
237
+ - Add support for `ActionDispatch` request id for better Rails compatibility.
74
238
 
75
239
  ## 1.0.11
76
240
 
77
- * Fix Ruby 2.4 deprecation warning on Fixnum (thanks koic).
78
- * Fix gemspec files to be flat array (thanks e2).
241
+ ### Fixed
242
+
243
+ - Fix Ruby 2.4 deprecation warning on Fixnum (thanks @koic).
244
+ - Fix gemspec files to be flat array (thanks @e2).
79
245
 
80
246
  ## 1.0.10
81
247
 
82
- * Expose option to manually roll log files.
83
- * Minor code cleanup.
248
+ ### Added
249
+
250
+ - Expose option to manually roll log files.
251
+
252
+ ### Changed
253
+
254
+ - Minor code cleanup.
84
255
 
85
256
  ## 1.0.9
86
257
 
87
- * Add method so Formatter is compatible with ActiveSupport logging extensions.
258
+ ### Added
259
+
260
+ - Add method so Formatter is compatible with `ActiveSupport` logging extensions.
88
261
 
89
262
  ## 1.0.8
90
263
 
91
- * Fix another internal variable name conflict with ActiveSupport logging extensions.
264
+ ### Fixed
265
+
266
+ - Fix another internal variable name conflict with `ActiveSupport` logging extensions.
92
267
 
93
268
  ## 1.0.7
94
269
 
95
- * Fix broken formatter attribute method.
270
+ ### Fixed
271
+
272
+ - Fix broken formatter attribute method.
96
273
 
97
274
  ## 1.0.6
98
275
 
99
- * Fix internal variable name conflict with ActiveSupport logging extensions.
276
+ ### Fixed
277
+
278
+ - Fix internal variable name conflict with `ActiveSupport` logging extensions.
100
279
 
101
280
  ## 1.0.5
102
281
 
103
- * Update docs.
104
- * Remove autoload calls to make thread safe.
105
- * Make compatible with Ruby 2.1.1 Pathname.
106
- * Make compatible with standard library Logger's use of progname as default message.
282
+ ### Changed
283
+
284
+ - Update docs.
285
+ - Remove autoload calls to make thread safe.
286
+ - Make compatible with Ruby 2.1.1 Pathname.
287
+ - Make compatible with standard library Logger's use of progname as default message.
107
288
 
108
289
  ## 1.0.4
109
290
 
110
- * Add ability to supply a unit of work id for a block instead of having one generated every time.
291
+ ### Added
292
+
293
+ - Add ability to supply a unit of work id for a block instead of having one generated every time.
111
294
 
112
295
  ## 1.0.3
113
296
 
114
- * Change log file output format to binary to avoid encoding warnings.
115
- * Fixed bug in log file rolling that left the file locked.
297
+ ### Fixed
298
+
299
+ - Change log file output format to binary to avoid encoding warnings.
300
+ - Fixed bug in log file rolling that left the file locked.
116
301
 
117
302
  ## 1.0.2
118
303
 
119
- * Remove deprecation warnings under ruby 1.9.3.
120
- * Add more error checking around file rolling.
304
+ ### Fixed
305
+
306
+ - Remove deprecation warnings under ruby 1.9.3.
307
+ - Add more error checking around file rolling.
121
308
 
122
309
  ## 1.0.1
123
310
 
124
- * Writes are no longer buffered by default.
311
+ ### Fixed
312
+
313
+ - Writes are no longer buffered by default.
314
+
315
+ ## 1.0.0
316
+
317
+ ### Added
318
+
319
+ - Initial release