logstash-logger 0.26.1 → 1.0.0

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 (58) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/tests.yml +51 -0
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +85 -105
  5. data/Appraisals +6 -18
  6. data/CHANGELOG.md +28 -0
  7. data/Gemfile +0 -1
  8. data/README.md +12 -833
  9. data/docs/buffering.md +70 -0
  10. data/docs/customization.md +86 -0
  11. data/docs/outputs.md +42 -0
  12. data/docs/rails.md +344 -0
  13. data/docs/ssl.md +90 -0
  14. data/docs/troubleshooting.md +84 -0
  15. data/docs/usage.md +148 -0
  16. data/gemfiles/{rails_4.2.gemfile → rails_7.2.gemfile} +1 -2
  17. data/gemfiles/{rails_5.0.gemfile → rails_8.0.gemfile} +1 -2
  18. data/gemfiles/{rails_4.0.gemfile → rails_8.1.gemfile} +1 -2
  19. data/lib/logstash-logger/buffer.rb +0 -1
  20. data/lib/logstash-logger/configuration.rb +1 -2
  21. data/lib/logstash-logger/device/aws_stream.rb +1 -1
  22. data/lib/logstash-logger/device/base.rb +2 -2
  23. data/lib/logstash-logger/device/connectable.rb +3 -11
  24. data/lib/logstash-logger/device/file.rb +21 -4
  25. data/lib/logstash-logger/device/http.rb +33 -0
  26. data/lib/logstash-logger/device/kafka.rb +153 -36
  27. data/lib/logstash-logger/device/redis.rb +8 -1
  28. data/lib/logstash-logger/device/tcp.rb +1 -5
  29. data/lib/logstash-logger/device.rb +24 -2
  30. data/lib/logstash-logger/formatter/base.rb +54 -9
  31. data/lib/logstash-logger/formatter/cee_syslog.rb +1 -1
  32. data/lib/logstash-logger/formatter/json.rb +13 -0
  33. data/lib/logstash-logger/formatter/json_lines.rb +13 -0
  34. data/lib/logstash-logger/formatter.rb +14 -6
  35. data/lib/logstash-logger/logger.rb +6 -19
  36. data/lib/logstash-logger/multi_logger.rb +2 -1
  37. data/lib/logstash-logger/railtie.rb +1 -1
  38. data/lib/logstash-logger/tagged_logging.rb +3 -1
  39. data/lib/logstash-logger/version.rb +1 -1
  40. data/logstash-logger.gemspec +9 -1
  41. data/spec/device/file_spec.rb +65 -0
  42. data/spec/device/http_spec.rb +11 -0
  43. data/spec/device/kafka_spec.rb +337 -14
  44. data/spec/device_spec.rb +13 -0
  45. data/spec/formatter/base_spec.rb +46 -1
  46. data/spec/formatter/cee_syslog_spec.rb +3 -3
  47. data/spec/formatter/json_lines_spec.rb +23 -0
  48. data/spec/formatter/json_spec.rb +49 -0
  49. data/spec/formatter_spec.rb +19 -2
  50. data/spec/logger_spec.rb +5 -5
  51. data/spec/multi_logger_spec.rb +16 -0
  52. data/spec/spec_helper.rb +2 -5
  53. data/spec/tagged_logging_spec.rb +15 -0
  54. metadata +89 -16
  55. data/.travis.yml +0 -26
  56. data/gemfiles/rails_3.2.gemfile +0 -9
  57. data/gemfiles/rails_4.1.gemfile +0 -9
  58. data/gemfiles/rails_5.1.gemfile +0 -9
data/.rubocop.yml CHANGED
@@ -1,3 +1,9 @@
1
+ plugins:
2
+ - rubocop-performance
3
+ - rubocop-rails
4
+ - rubocop-rake
5
+ - rubocop-rspec
6
+
1
7
  AllCops:
2
8
  DisabledByDefault: true
3
9
 
@@ -21,7 +27,7 @@ Lint/AssignmentInCondition:
21
27
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
22
28
  Enabled: true
23
29
 
24
- Lint/BlockAlignment:
30
+ Layout/BlockAlignment:
25
31
  Description: 'Align block ends correctly.'
26
32
  Enabled: true
27
33
 
@@ -29,7 +35,7 @@ Lint/CircularArgumentReference:
29
35
  Description: "Don't refer to the keyword argument in the default value."
30
36
  Enabled: true
31
37
 
32
- Lint/ConditionPosition:
38
+ Layout/ConditionPosition:
33
39
  Description: >-
34
40
  Checks for condition placed in a confusing position relative to
35
41
  the keyword.
@@ -40,7 +46,7 @@ Lint/Debugger:
40
46
  Description: 'Check for debugger calls.'
41
47
  Enabled: true
42
48
 
43
- Lint/DefEndAlignment:
49
+ Layout/DefEndAlignment:
44
50
  Description: 'Align ends corresponding to defs correctly.'
45
51
  Enabled: true
46
52
 
@@ -68,11 +74,11 @@ Lint/EmptyInterpolation:
68
74
  Description: 'Checks for empty string interpolation.'
69
75
  Enabled: true
70
76
 
71
- Lint/EndAlignment:
77
+ Layout/EndAlignment:
72
78
  Description: 'Align ends correctly.'
73
79
  Enabled: true
74
80
 
75
- Lint/EndInMethod:
81
+ Style/EndBlock:
76
82
  Description: 'END blocks should not be placed inside method definitions.'
77
83
  Enabled: true
78
84
 
@@ -81,7 +87,7 @@ Lint/EnsureReturn:
81
87
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
82
88
  Enabled: true
83
89
 
84
- Lint/Eval:
90
+ Security/Eval:
85
91
  Description: 'The use of eval represents a serious security risk.'
86
92
  Enabled: true
87
93
 
@@ -89,18 +95,13 @@ Lint/FormatParameterMismatch:
89
95
  Description: 'The number of parameters to format/sprint must match the fields.'
90
96
  Enabled: true
91
97
 
92
- Lint/HandleExceptions:
98
+ Lint/SuppressedException:
93
99
  Description: "Don't suppress exception."
94
100
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
95
101
  Enabled: true
96
102
 
97
- Lint/InvalidCharacterLiteral:
98
- Description: >-
99
- Checks for invalid character literals with a non-escaped
100
- whitespace character.
101
- Enabled: true
102
103
 
103
- Lint/LiteralInCondition:
104
+ Lint/LiteralAsCondition:
104
105
  Description: 'Checks of literals used in conditions.'
105
106
  Enabled: true
106
107
 
@@ -148,7 +149,7 @@ Lint/ShadowingOuterLocalVariable:
148
149
  for block arguments or block local variables.
149
150
  Enabled: true
150
151
 
151
- Lint/StringConversionInInterpolation:
152
+ Lint/RedundantStringCoercion:
152
153
  Description: 'Checks for Object#to_s usage in string interpolation.'
153
154
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
154
155
  Enabled: true
@@ -157,7 +158,7 @@ Lint/UnderscorePrefixedVariableName:
157
158
  Description: 'Do not use prefix `_` for a variable that is used.'
158
159
  Enabled: true
159
160
 
160
- Lint/UnneededDisable:
161
+ Lint/RedundantCopDisableDirective:
161
162
  Description: >-
162
163
  Checks for rubocop:disable comments that can be removed.
163
164
  Note: this cop is not disabled when disabling all cops.
@@ -187,9 +188,6 @@ Lint/UselessAssignment:
187
188
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
188
189
  Enabled: true
189
190
 
190
- Lint/UselessComparison:
191
- Description: 'Checks for comparison of something with itself.'
192
- Enabled: true
193
191
 
194
192
  Lint/UselessElseWithoutRescue:
195
193
  Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
@@ -230,7 +228,7 @@ Metrics/CyclomaticComplexity:
230
228
  of test cases needed to validate a method.
231
229
  Enabled: true
232
230
 
233
- Metrics/LineLength:
231
+ Layout/LineLength:
234
232
  Description: 'Limit lines to 80 characters.'
235
233
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
236
234
  Enabled: false
@@ -258,6 +256,8 @@ Metrics/PerceivedComplexity:
258
256
  Enabled: false
259
257
 
260
258
  ##################### Performance #############################
259
+ # Note: Performance cops have been extracted to the `rubocop-performance` gem.
260
+ # These configurations will only work if that gem is installed.
261
261
 
262
262
  Performance/Count:
263
263
  Description: >-
@@ -291,7 +291,7 @@ Performance/ReverseEach:
291
291
  Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
292
292
  Enabled: true
293
293
 
294
- Performance/Sample:
294
+ Style/Sample:
295
295
  Description: >-
296
296
  Use `sample` instead of `shuffle.first`,
297
297
  `shuffle.last`, and `shuffle[Fixnum]`.
@@ -314,6 +314,8 @@ Performance/StringReplacement:
314
314
  Enabled: true
315
315
 
316
316
  ##################### Rails ##################################
317
+ # Note: Rails cops have been extracted to the `rubocop-rails` gem.
318
+ # These configurations will only work if that gem is installed.
317
319
 
318
320
  Rails/ActionFilter:
319
321
  Description: 'Enforces consistent use of action filter methods.'
@@ -367,12 +369,12 @@ Rails/Validation:
367
369
 
368
370
  ################## Style #################################
369
371
 
370
- Style/AccessModifierIndentation:
372
+ Layout/AccessModifierIndentation:
371
373
  Description: Check indentation of private/protected visibility modifiers.
372
374
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
373
375
  Enabled: false
374
376
 
375
- Style/AccessorMethodName:
377
+ Naming/AccessorMethodName:
376
378
  Description: Check the naming of accessor methods for get_/set_.
377
379
  Enabled: false
378
380
 
@@ -381,20 +383,20 @@ Style/Alias:
381
383
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
382
384
  Enabled: false
383
385
 
384
- Style/AlignArray:
386
+ Layout/ArrayAlignment:
385
387
  Description: >-
386
388
  Align the elements of an array literal if they span more than
387
389
  one line.
388
390
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
389
391
  Enabled: false
390
392
 
391
- Style/AlignHash:
393
+ Layout/HashAlignment:
392
394
  Description: >-
393
395
  Align the elements of a hash literal if they span more than
394
396
  one line.
395
397
  Enabled: false
396
398
 
397
- Style/AlignParameters:
399
+ Layout/ArgumentAlignment:
398
400
  Description: >-
399
401
  Align the parameters of a method call if they span more
400
402
  than one line.
@@ -416,7 +418,7 @@ Style/AsciiComments:
416
418
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
417
419
  Enabled: false
418
420
 
419
- Style/AsciiIdentifiers:
421
+ Naming/AsciiIdentifiers:
420
422
  Description: 'Use only ascii symbols in identifiers.'
421
423
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
422
424
  Enabled: false
@@ -441,7 +443,7 @@ Style/BlockComments:
441
443
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
442
444
  Enabled: false
443
445
 
444
- Style/BlockEndNewline:
446
+ Layout/BlockEndNewline:
445
447
  Description: 'Put end statement of multiline block on its own line.'
446
448
  Enabled: false
447
449
 
@@ -453,16 +455,13 @@ Style/BlockDelimiters:
453
455
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
454
456
  Enabled: false
455
457
 
456
- Style/BracesAroundHashParameters:
457
- Description: 'Enforce braces style around hash parameters.'
458
- Enabled: false
459
458
 
460
459
  Style/CaseEquality:
461
460
  Description: 'Avoid explicit use of the case equality operator(===).'
462
461
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
463
462
  Enabled: false
464
463
 
465
- Style/CaseIndentation:
464
+ Layout/CaseIndentation:
466
465
  Description: 'Indentation of when in a case/when/[else/]end.'
467
466
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
468
467
  Enabled: false
@@ -472,7 +471,7 @@ Style/CharacterLiteral:
472
471
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
473
472
  Enabled: false
474
473
 
475
- Style/ClassAndModuleCamelCase:
474
+ Naming/ClassAndModuleCamelCase:
476
475
  Description: 'Use CamelCase for classes and modules.'
477
476
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
478
477
  Enabled: false
@@ -495,7 +494,7 @@ Style/ClassVars:
495
494
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
496
495
  Enabled: false
497
496
 
498
- Style/ClosingParenthesisIndentation:
497
+ Layout/ClosingParenthesisIndentation:
499
498
  Description: 'Checks the indentation of hanging closing parentheses.'
500
499
  Enabled: false
501
500
 
@@ -514,11 +513,11 @@ Style/CommentAnnotation:
514
513
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
515
514
  Enabled: false
516
515
 
517
- Style/CommentIndentation:
516
+ Layout/CommentIndentation:
518
517
  Description: 'Indentation of comments.'
519
518
  Enabled: false
520
519
 
521
- Style/ConstantName:
520
+ Naming/ConstantName:
522
521
  Description: 'Constants should use SCREAMING_SNAKE_CASE.'
523
522
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
524
523
  Enabled: false
@@ -537,7 +536,7 @@ Style/Documentation:
537
536
  Description: 'Document classes and non-namespace modules.'
538
537
  Enabled: false
539
538
 
540
- Style/DotPosition:
539
+ Layout/DotPosition:
541
540
  Description: 'Checks the position of the dot in multi-line method calls.'
542
541
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
543
542
  Enabled: false
@@ -551,7 +550,7 @@ Style/EachWithObject:
551
550
  Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
552
551
  Enabled: false
553
552
 
554
- Style/ElseAlignment:
553
+ Layout/ElseAlignment:
555
554
  Description: 'Align elses and elsifs correctly.'
556
555
  Enabled: false
557
556
 
@@ -559,32 +558,32 @@ Style/EmptyElse:
559
558
  Description: 'Avoid empty else-clauses.'
560
559
  Enabled: false
561
560
 
562
- Style/EmptyLineBetweenDefs:
561
+ Layout/EmptyLineBetweenDefs:
563
562
  Description: 'Use empty lines between defs.'
564
563
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
565
564
  Enabled: false
566
565
 
567
- Style/EmptyLines:
566
+ Layout/EmptyLines:
568
567
  Description: "Don't use several empty lines in a row."
569
568
  Enabled: false
570
569
 
571
- Style/EmptyLinesAroundAccessModifier:
570
+ Layout/EmptyLinesAroundAccessModifier:
572
571
  Description: "Keep blank lines around access modifiers."
573
572
  Enabled: false
574
573
 
575
- Style/EmptyLinesAroundBlockBody:
574
+ Layout/EmptyLinesAroundBlockBody:
576
575
  Description: "Keeps track of empty lines around block bodies."
577
576
  Enabled: false
578
577
 
579
- Style/EmptyLinesAroundClassBody:
578
+ Layout/EmptyLinesAroundClassBody:
580
579
  Description: "Keeps track of empty lines around class bodies."
581
580
  Enabled: false
582
581
 
583
- Style/EmptyLinesAroundModuleBody:
582
+ Layout/EmptyLinesAroundModuleBody:
584
583
  Description: "Keeps track of empty lines around module bodies."
585
584
  Enabled: false
586
585
 
587
- Style/EmptyLinesAroundMethodBody:
586
+ Layout/EmptyLinesAroundMethodBody:
588
587
  Description: "Keeps track of empty lines around method bodies."
589
588
  Enabled: false
590
589
 
@@ -593,12 +592,7 @@ Style/EmptyLiteral:
593
592
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
594
593
  Enabled: false
595
594
 
596
- Style/EndBlock:
597
- Description: 'Avoid the use of END blocks.'
598
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
599
- Enabled: false
600
-
601
- Style/EndOfLine:
595
+ Layout/EndOfLine:
602
596
  Description: 'Use Unix-style line endings.'
603
597
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
604
598
  Enabled: false
@@ -608,25 +602,25 @@ Style/EvenOdd:
608
602
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
609
603
  Enabled: false
610
604
 
611
- Style/ExtraSpacing:
605
+ Layout/ExtraSpacing:
612
606
  Description: 'Do not use unnecessary spacing.'
613
607
  Enabled: false
614
608
 
615
- Style/FileName:
609
+ Naming/FileName:
616
610
  Description: 'Use snake_case for source file names.'
617
611
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
618
612
  Enabled: false
619
613
 
620
- Style/InitialIndentation:
614
+ Layout/InitialIndentation:
621
615
  Description: >-
622
616
  Checks the indentation of the first non-blank non-comment line in a file.
623
617
  Enabled: false
624
618
 
625
- Style/FirstParameterIndentation:
619
+ Layout/FirstParameterIndentation:
626
620
  Description: 'Checks the indentation of the first parameter in a method call.'
627
621
  Enabled: false
628
622
 
629
- Style/FlipFlop:
623
+ Lint/FlipFlop:
630
624
  Description: 'Checks for flip flops'
631
625
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
632
626
  Enabled: false
@@ -671,25 +665,15 @@ Style/IfWithSemicolon:
671
665
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
672
666
  Enabled: false
673
667
 
674
- Style/IndentationConsistency:
668
+ Layout/IndentationConsistency:
675
669
  Description: 'Keep indentation straight.'
676
670
  Enabled: false
677
671
 
678
- Style/IndentationWidth:
672
+ Layout/IndentationWidth:
679
673
  Description: 'Use 2 spaces for indentation.'
680
674
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
681
675
  Enabled: false
682
676
 
683
- Style/IndentArray:
684
- Description: >-
685
- Checks the indentation of the first element in an array
686
- literal.
687
- Enabled: false
688
-
689
- Style/IndentHash:
690
- Description: 'Checks the indentation of the first key in a hash literal.'
691
- Enabled: false
692
-
693
677
  Style/InfiniteLoop:
694
678
  Description: 'Use Kernel#loop for infinite loops.'
695
679
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
@@ -705,7 +689,7 @@ Style/LambdaCall:
705
689
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
706
690
  Enabled: false
707
691
 
708
- Style/LeadingCommentSpace:
692
+ Layout/LeadingCommentSpace:
709
693
  Description: 'Comments should start with a space.'
710
694
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
711
695
  Enabled: false
@@ -716,7 +700,7 @@ Style/LineEndConcatenation:
716
700
  line end.
717
701
  Enabled: false
718
702
 
719
- Style/MethodCallParentheses:
703
+ Style/MethodCallWithoutArgsParentheses:
720
704
  Description: 'Do not use parentheses for method calls with no arguments.'
721
705
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
722
706
  Enabled: false
@@ -728,7 +712,7 @@ Style/MethodDefParentheses:
728
712
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
729
713
  Enabled: false
730
714
 
731
- Style/MethodName:
715
+ Naming/MethodName:
732
716
  Description: 'Use the configured style when naming methods.'
733
717
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
734
718
  Enabled: false
@@ -743,7 +727,7 @@ Style/MultilineBlockChain:
743
727
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
744
728
  Enabled: false
745
729
 
746
- Style/MultilineBlockLayout:
730
+ Layout/MultilineBlockLayout:
747
731
  Description: 'Ensures newlines after multiline block do statements.'
748
732
  Enabled: false
749
733
 
@@ -752,7 +736,7 @@ Style/MultilineIfThen:
752
736
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
753
737
  Enabled: false
754
738
 
755
- Style/MultilineOperationIndentation:
739
+ Layout/MultilineOperationIndentation:
756
740
  Description: >-
757
741
  Checks indentation of binary operations that span more than
758
742
  one line.
@@ -816,7 +800,7 @@ Style/OneLineConditional:
816
800
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
817
801
  Enabled: false
818
802
 
819
- Style/OpMethod:
803
+ Naming/BinaryOperatorParameterName:
820
804
  Description: 'When defining binary operators, name the argument other.'
821
805
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
822
806
  Enabled: false
@@ -858,7 +842,7 @@ Style/PerlBackrefs:
858
842
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
859
843
  Enabled: false
860
844
 
861
- Style/PredicateName:
845
+ Naming/PredicatePrefix:
862
846
  Description: 'Check the names of predicate methods.'
863
847
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
864
848
  Enabled: false
@@ -898,7 +882,7 @@ Style/RegexpLiteral:
898
882
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
899
883
  Enabled: false
900
884
 
901
- Style/RescueEnsureAlignment:
885
+ Layout/RescueEnsureAlignment:
902
886
  Description: 'Align rescues and ensures correctly.'
903
887
  Enabled: false
904
888
 
@@ -934,75 +918,75 @@ Style/SingleLineMethods:
934
918
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
935
919
  Enabled: false
936
920
 
937
- Style/SpaceBeforeFirstArg:
921
+ Layout/SpaceBeforeFirstArg:
938
922
  Description: >-
939
923
  Checks that exactly one space is used between a method name
940
924
  and the first argument for method calls without parentheses.
941
925
  Enabled: true
942
926
 
943
- Style/SpaceAfterColon:
927
+ Layout/SpaceAfterColon:
944
928
  Description: 'Use spaces after colons.'
945
929
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
946
930
  Enabled: false
947
931
 
948
- Style/SpaceAfterComma:
932
+ Layout/SpaceAfterComma:
949
933
  Description: 'Use spaces after commas.'
950
934
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
951
935
  Enabled: false
952
936
 
953
- Style/SpaceAroundKeyword:
937
+ Layout/SpaceAroundKeyword:
954
938
  Description: 'Use spaces around keywords.'
955
939
  Enabled: false
956
940
 
957
- Style/SpaceAfterMethodName:
941
+ Layout/SpaceAfterMethodName:
958
942
  Description: >-
959
943
  Do not put a space between a method name and the opening
960
944
  parenthesis in a method definition.
961
945
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
962
946
  Enabled: false
963
947
 
964
- Style/SpaceAfterNot:
948
+ Layout/SpaceAfterNot:
965
949
  Description: Tracks redundant space after the ! operator.
966
950
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
967
951
  Enabled: false
968
952
 
969
- Style/SpaceAfterSemicolon:
953
+ Layout/SpaceAfterSemicolon:
970
954
  Description: 'Use spaces after semicolons.'
971
955
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
972
956
  Enabled: false
973
957
 
974
- Style/SpaceBeforeBlockBraces:
958
+ Layout/SpaceBeforeBlockBraces:
975
959
  Description: >-
976
960
  Checks that the left block brace has or doesn't have space
977
961
  before it.
978
962
  Enabled: false
979
963
 
980
- Style/SpaceBeforeComma:
964
+ Layout/SpaceBeforeComma:
981
965
  Description: 'No spaces before commas.'
982
966
  Enabled: false
983
967
 
984
- Style/SpaceBeforeComment:
968
+ Layout/SpaceBeforeComment:
985
969
  Description: >-
986
970
  Checks for missing space between code and a comment on the
987
971
  same line.
988
972
  Enabled: false
989
973
 
990
- Style/SpaceBeforeSemicolon:
974
+ Layout/SpaceBeforeSemicolon:
991
975
  Description: 'No spaces before semicolons.'
992
976
  Enabled: false
993
977
 
994
- Style/SpaceInsideBlockBraces:
978
+ Layout/SpaceInsideBlockBraces:
995
979
  Description: >-
996
980
  Checks that block braces have or don't have surrounding space.
997
981
  For blocks taking parameters, checks that the left brace has
998
982
  or doesn't have trailing space.
999
983
  Enabled: false
1000
984
 
1001
- Style/SpaceAroundBlockParameters:
985
+ Layout/SpaceAroundBlockParameters:
1002
986
  Description: 'Checks the spacing inside and after block parameters pipes.'
1003
987
  Enabled: false
1004
988
 
1005
- Style/SpaceAroundEqualsInParameterDefault:
989
+ Layout/SpaceAroundEqualsInParameterDefault:
1006
990
  Description: >-
1007
991
  Checks that the equals signs in parameter default assignments
1008
992
  have or don't have surrounding space depending on
@@ -1010,32 +994,32 @@ Style/SpaceAroundEqualsInParameterDefault:
1010
994
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
1011
995
  Enabled: false
1012
996
 
1013
- Style/SpaceAroundOperators:
997
+ Layout/SpaceAroundOperators:
1014
998
  Description: 'Use a single space around operators.'
1015
999
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
1016
1000
  Enabled: false
1017
1001
 
1018
- Style/SpaceInsideBrackets:
1002
+ Layout/SpaceInsideArrayLiteralBrackets:
1019
1003
  Description: 'No spaces after [ or before ].'
1020
1004
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
1021
1005
  Enabled: false
1022
1006
 
1023
- Style/SpaceInsideHashLiteralBraces:
1007
+ Layout/SpaceInsideHashLiteralBraces:
1024
1008
  Description: "Use spaces inside hash literal braces - or don't."
1025
1009
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
1026
1010
  Enabled: false
1027
1011
 
1028
- Style/SpaceInsideParens:
1012
+ Layout/SpaceInsideParens:
1029
1013
  Description: 'No spaces after ( or before ).'
1030
1014
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
1031
1015
  Enabled: false
1032
1016
 
1033
- Style/SpaceInsideRangeLiteral:
1017
+ Layout/SpaceInsideRangeLiteral:
1034
1018
  Description: 'No spaces inside range literals.'
1035
1019
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
1036
1020
  Enabled: false
1037
1021
 
1038
- Style/SpaceInsideStringInterpolation:
1022
+ Layout/SpaceInsideStringInterpolation:
1039
1023
  Description: 'Checks for padding/surrounding spaces inside string interpolation.'
1040
1024
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
1041
1025
  Enabled: false
@@ -1069,12 +1053,12 @@ Style/SymbolProc:
1069
1053
  Description: 'Use symbols as procs instead of blocks when possible.'
1070
1054
  Enabled: false
1071
1055
 
1072
- Style/Tab:
1056
+ Layout/IndentationStyle:
1073
1057
  Description: 'No hard tabs.'
1074
1058
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
1075
1059
  Enabled: false
1076
1060
 
1077
- Style/TrailingBlankLines:
1061
+ Layout/TrailingEmptyLines:
1078
1062
  Description: 'Checks trailing blank lines and final newline.'
1079
1063
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
1080
1064
  Enabled: false
@@ -1084,12 +1068,8 @@ Style/TrailingCommaInArguments:
1084
1068
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
1085
1069
  Enabled: false
1086
1070
 
1087
- Style/TrailingCommaInLiteral:
1088
- Description: 'Checks for trailing comma in literals.'
1089
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
1090
- Enabled: false
1091
1071
 
1092
- Style/TrailingWhitespace:
1072
+ Layout/TrailingWhitespace:
1093
1073
  Description: 'Avoid trailing whitespace.'
1094
1074
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
1095
1075
  Enabled: false
@@ -1106,11 +1086,11 @@ Style/UnlessElse:
1106
1086
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
1107
1087
  Enabled: false
1108
1088
 
1109
- Style/UnneededCapitalW:
1089
+ Style/RedundantCapitalW:
1110
1090
  Description: 'Checks for %W when interpolation is not needed.'
1111
1091
  Enabled: false
1112
1092
 
1113
- Style/UnneededPercentQ:
1093
+ Style/RedundantPercentQ:
1114
1094
  Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
1115
1095
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
1116
1096
  Enabled: false
@@ -1128,7 +1108,7 @@ Style/VariableInterpolation:
1128
1108
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
1129
1109
  Enabled: false
1130
1110
 
1131
- Style/VariableName:
1111
+ Naming/VariableName:
1132
1112
  Description: 'Use the configured style when naming variables.'
1133
1113
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
1134
1114
  Enabled: false
data/Appraisals CHANGED
@@ -1,23 +1,11 @@
1
- #appraise "rails-3.2" do
2
- #gem "rails", "~> 3.2.18"
3
- #end
4
-
5
- appraise "rails-4.0" do
6
- gem "rails", "~> 4.0.0"
7
- end
8
-
9
- appraise "rails-4.1" do
10
- gem "rails", "~> 4.1.1"
11
- end
12
-
13
- appraise "rails-4.2" do
14
- gem "rails", "~> 4.2.0"
1
+ appraise "rails-7.2" do
2
+ gem "rails", "~> 7.2.0"
15
3
  end
16
4
 
17
- appraise "rails-5.0" do
18
- gem "rails", "~> 5.0.0"
5
+ appraise "rails-8.0" do
6
+ gem "rails", "~> 8.0.0"
19
7
  end
20
8
 
21
- appraise "rails-5.1" do
22
- gem "rails", "~> 5.1.0"
9
+ appraise "rails-8.1" do
10
+ gem "rails", "~> 8.1.0"
23
11
  end
data/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ ## 1.0.0
2
+
3
+ ### Breaking Changes
4
+ - Remove deprecated features (deprecated constructor, Poseidon Kafka implementation). [#177](https://github.com/dwbutler/logstash-logger/pull/177)
5
+ - Drops support for older Ruby/Rails versions. Configures modern Ruby and Rails. [#176](https://github.com/dwbutler/logstash-logger/pull/176)
6
+
7
+ ### Features
8
+ - New Kafka device implementation using `ruby-kafka` gem, replacing deprecated Poseidon. Includes topic validation, buffer group configuration, and improved error handling. [#175](https://github.com/dwbutler/logstash-logger/pull/175)
9
+ - Add buffered HTTP device to write to Logstash HTTP input. [#163](https://github.com/dwbutler/logstash-logger/pull/163) [#135](https://github.com/dwbutler/logstash-logger/issues/135)
10
+ - Support for `shift_age` and `shift_size` options in File device. [#164](https://github.com/dwbutler/logstash-logger/issues/164)
11
+ - Configure `buffer_max_items` for Connectable devices using URI query string options. [#176](https://github.com/dwbutler/logstash-logger/pull/176)
12
+ - Wrap hostname into a hash to ensure compatibility with Elastic >= 8. [#172](https://github.com/dwbutler/logstash-logger/pull/172)
13
+ - Put `@timestamp` first in JSON output. [#174](https://github.com/dwbutler/logstash-logger/pull/174) [#168](https://github.com/dwbutler/logstash-logger/issues/168)
14
+ - Instantiate custom formatter classes with `customize_event` keyword arg. [#155](https://github.com/dwbutler/logstash-logger/pull/155)
15
+ - Allow `.reset` on MultiLogger. [#153](https://github.com/dwbutler/logstash-logger/pull/153) [#151](https://github.com/dwbutler/logstash-logger/issues/151)
16
+
17
+ ### Bug Fixes
18
+ - Fix JRuby compatibility issues. [#179](https://github.com/dwbutler/logstash-logger/pull/179)
19
+ - Handle non-string tags in tagged logging. [#173](https://github.com/dwbutler/logstash-logger/pull/173)
20
+ - Allow passing integers as tags to `TaggedLogging::Formatter`. [#152](https://github.com/dwbutler/logstash-logger/pull/152)
21
+ - Fix alias in MultiLogger. [#161](https://github.com/dwbutler/logstash-logger/pull/161)
22
+ - Gracefully handle JSON `Encoding::UndefinedConversionError`. [#165](https://github.com/dwbutler/logstash-logger/pull/165) [#158](https://github.com/dwbutler/logstash-logger/issues/158)
23
+ - Fix argument error for unknown keyword `:sync` with Redis connection. [#171](https://github.com/dwbutler/logstash-logger/pull/171)
24
+
25
+ ### Other
26
+ - Move documentation from README to `docs/` directory. [#178](https://github.com/dwbutler/logstash-logger/pull/178)
27
+ - Migrate CI to GitHub Actions.
28
+
1
29
  ## 0.26.1
2
30
 
3
31
  - Fix: Support for SSL with the TCP device without an SSL context in Ruby