lumberjack 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/MIT_LICENSE +20 -0
  2. data/README.rdoc +86 -0
  3. data/Rakefile +56 -0
  4. data/VERSION +1 -0
  5. data/lib/lumberjack.rb +39 -0
  6. data/lib/lumberjack/device.rb +26 -0
  7. data/lib/lumberjack/device/date_rolling_log_file.rb +58 -0
  8. data/lib/lumberjack/device/log_file.rb +18 -0
  9. data/lib/lumberjack/device/null.rb +15 -0
  10. data/lib/lumberjack/device/rolling_log_file.rb +109 -0
  11. data/lib/lumberjack/device/size_rolling_log_file.rb +58 -0
  12. data/lib/lumberjack/device/writer.rb +119 -0
  13. data/lib/lumberjack/formatter.rb +76 -0
  14. data/lib/lumberjack/formatter/exception_formatter.rb +12 -0
  15. data/lib/lumberjack/formatter/inspect_formatter.rb +10 -0
  16. data/lib/lumberjack/formatter/pretty_print_formatter.rb +23 -0
  17. data/lib/lumberjack/formatter/string_formatter.rb +10 -0
  18. data/lib/lumberjack/log_entry.rb +36 -0
  19. data/lib/lumberjack/logger.rb +302 -0
  20. data/lib/lumberjack/rack.rb +5 -0
  21. data/lib/lumberjack/rack/unit_of_work.rb +15 -0
  22. data/lib/lumberjack/severity.rb +23 -0
  23. data/lib/lumberjack/template.rb +71 -0
  24. data/spec/device/date_rolling_log_file_spec.rb +66 -0
  25. data/spec/device/date_rolling_log_file_spec.rbc +2118 -0
  26. data/spec/device/log_file_spec.rb +26 -0
  27. data/spec/device/log_file_spec.rbc +727 -0
  28. data/spec/device/null_spec.rb +12 -0
  29. data/spec/device/null_spec.rbc +362 -0
  30. data/spec/device/rolling_log_file_spec.rb +117 -0
  31. data/spec/device/rolling_log_file_spec.rbc +2894 -0
  32. data/spec/device/size_rolling_log_file_spec.rb +54 -0
  33. data/spec/device/size_rolling_log_file_spec.rbc +1961 -0
  34. data/spec/device/stream_spec.rbc +3310 -0
  35. data/spec/device/writer_spec.rb +118 -0
  36. data/spec/entry_spec.rbc +2333 -0
  37. data/spec/formatter/exception_formatter_spec.rb +20 -0
  38. data/spec/formatter/exception_formatter_spec.rbc +620 -0
  39. data/spec/formatter/inspect_formatter_spec.rb +13 -0
  40. data/spec/formatter/inspect_formatter_spec.rbc +360 -0
  41. data/spec/formatter/pretty_print_formatter_spec.rb +14 -0
  42. data/spec/formatter/pretty_print_formatter_spec.rbc +380 -0
  43. data/spec/formatter/string_formatter_spec.rb +12 -0
  44. data/spec/formatter/string_formatter_spec.rbc +314 -0
  45. data/spec/formatter_spec.rb +45 -0
  46. data/spec/formatter_spec.rbc +1431 -0
  47. data/spec/log_entry_spec.rb +69 -0
  48. data/spec/logger_spec.rb +390 -0
  49. data/spec/logger_spec.rbc +10043 -0
  50. data/spec/lumberjack_spec.rb +22 -0
  51. data/spec/lumberjack_spec.rbc +523 -0
  52. data/spec/rack/unit_of_work_spec.rb +26 -0
  53. data/spec/rack/unit_of_work_spec.rbc +697 -0
  54. data/spec/severity_spec.rb +23 -0
  55. data/spec/spec_helper.rb +16 -0
  56. data/spec/spec_helper.rbc +391 -0
  57. data/spec/template_spec.rb +34 -0
  58. data/spec/template_spec.rbc +1563 -0
  59. data/spec/unique_identifier_spec.rbc +329 -0
  60. metadata +128 -0
@@ -0,0 +1,54 @@
1
+ require 'spec_helper'
2
+
3
+ describe Lumberjack::Device::SizeRollingLogFile do
4
+
5
+ before :all do
6
+ create_tmp_dir
7
+ end
8
+
9
+ after :all do
10
+ delete_tmp_dir
11
+ end
12
+
13
+ it "should roll a file when it gets to a specified size" do
14
+ log_file = File.join(tmp_dir, "a#{rand(1000000000)}.log")
15
+ device = Lumberjack::Device::SizeRollingLogFile.new(log_file, :max_size => 40, :template => ":message")
16
+ logger = Lumberjack::Logger.new(device, :buffer_size => 2)
17
+ 4.times do |i|
18
+ logger.error("test message #{i + 1}")
19
+ logger.flush
20
+ end
21
+ logger.close
22
+
23
+ File.read("#{log_file}.1").split(Lumberjack::LINE_SEPARATOR).should == ["test message 1", "test message 2", "test message 3"]
24
+ File.read(log_file).should == "test message 4#{Lumberjack::LINE_SEPARATOR}"
25
+ end
26
+
27
+ it "should be able to specify the max size in kilobytes" do
28
+ log_file = File.join(tmp_dir, "b#{rand(1000000000)}.log")
29
+ device = Lumberjack::Device::SizeRollingLogFile.new(log_file, :max_size => "32K")
30
+ device.max_size.should == 32768
31
+ end
32
+
33
+ it "should be able to specify the max size in megabytes" do
34
+ log_file = File.join(tmp_dir, "c#{rand(1000000000)}.log")
35
+ device = Lumberjack::Device::SizeRollingLogFile.new(log_file, :max_size => "100M")
36
+ device.max_size.should == 104_857_600
37
+ end
38
+
39
+ it "should be able to specify the max size in gigabytes" do
40
+ log_file = File.join(tmp_dir, "d#{rand(1000000000)}.log")
41
+ device = Lumberjack::Device::SizeRollingLogFile.new(log_file, :max_size => "1G")
42
+ device.max_size.should == 1_073_741_824
43
+ end
44
+
45
+ it "should figure out the next archive file name available" do
46
+ log_file = File.join(tmp_dir, "filename.log")
47
+ (3..11).each do |i|
48
+ File.open("#{log_file}.#{i}", 'w'){|f| f.write(i.to_s)}
49
+ end
50
+ device = Lumberjack::Device::SizeRollingLogFile.new(log_file, :max_size => "100M")
51
+ device.archive_file_suffix.should == "12"
52
+ end
53
+
54
+ end
@@ -0,0 +1,1961 @@
1
+ !RBIX
2
+ 0
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 26
13
+ 5
14
+ 7
15
+ 0
16
+ 64
17
+ 47
18
+ 49
19
+ 1
20
+ 1
21
+ 15
22
+ 5
23
+ 45
24
+ 2
25
+ 3
26
+ 43
27
+ 4
28
+ 43
29
+ 5
30
+ 56
31
+ 6
32
+ 47
33
+ 50
34
+ 7
35
+ 1
36
+ 15
37
+ 2
38
+ 11
39
+ I
40
+ 3
41
+ I
42
+ 0
43
+ I
44
+ 0
45
+ I
46
+ 0
47
+ n
48
+ p
49
+ 8
50
+ s
51
+ 11
52
+ spec_helper
53
+ x
54
+ 7
55
+ require
56
+ x
57
+ 10
58
+ Lumberjack
59
+ n
60
+ x
61
+ 6
62
+ Device
63
+ x
64
+ 18
65
+ SizeRollingLogFile
66
+ M
67
+ 1
68
+ p
69
+ 2
70
+ x
71
+ 9
72
+ for_block
73
+ t
74
+ n
75
+ x
76
+ 9
77
+ __block__
78
+ i
79
+ 75
80
+ 5
81
+ 7
82
+ 0
83
+ 56
84
+ 1
85
+ 47
86
+ 50
87
+ 2
88
+ 1
89
+ 15
90
+ 5
91
+ 7
92
+ 0
93
+ 56
94
+ 3
95
+ 47
96
+ 50
97
+ 4
98
+ 1
99
+ 15
100
+ 5
101
+ 7
102
+ 5
103
+ 64
104
+ 56
105
+ 6
106
+ 47
107
+ 50
108
+ 7
109
+ 1
110
+ 15
111
+ 5
112
+ 7
113
+ 8
114
+ 64
115
+ 56
116
+ 9
117
+ 47
118
+ 50
119
+ 7
120
+ 1
121
+ 15
122
+ 5
123
+ 7
124
+ 10
125
+ 64
126
+ 56
127
+ 11
128
+ 47
129
+ 50
130
+ 7
131
+ 1
132
+ 15
133
+ 5
134
+ 7
135
+ 12
136
+ 64
137
+ 56
138
+ 13
139
+ 47
140
+ 50
141
+ 7
142
+ 1
143
+ 15
144
+ 5
145
+ 7
146
+ 14
147
+ 64
148
+ 56
149
+ 15
150
+ 47
151
+ 50
152
+ 7
153
+ 1
154
+ 11
155
+ I
156
+ 4
157
+ I
158
+ 0
159
+ I
160
+ 0
161
+ I
162
+ 0
163
+ I
164
+ -2
165
+ p
166
+ 16
167
+ x
168
+ 3
169
+ all
170
+ M
171
+ 1
172
+ p
173
+ 2
174
+ x
175
+ 9
176
+ for_block
177
+ t
178
+ n
179
+ x
180
+ 9
181
+ __block__
182
+ i
183
+ 4
184
+ 5
185
+ 48
186
+ 0
187
+ 11
188
+ I
189
+ 2
190
+ I
191
+ 0
192
+ I
193
+ 0
194
+ I
195
+ 0
196
+ I
197
+ -2
198
+ p
199
+ 1
200
+ x
201
+ 14
202
+ create_tmp_dir
203
+ p
204
+ 3
205
+ I
206
+ 0
207
+ I
208
+ 6
209
+ I
210
+ 4
211
+ x
212
+ 80
213
+ /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb
214
+ p
215
+ 0
216
+ x
217
+ 6
218
+ before
219
+ M
220
+ 1
221
+ p
222
+ 2
223
+ x
224
+ 9
225
+ for_block
226
+ t
227
+ n
228
+ x
229
+ 9
230
+ __block__
231
+ i
232
+ 4
233
+ 5
234
+ 48
235
+ 0
236
+ 11
237
+ I
238
+ 2
239
+ I
240
+ 0
241
+ I
242
+ 0
243
+ I
244
+ 0
245
+ I
246
+ -2
247
+ p
248
+ 1
249
+ x
250
+ 14
251
+ delete_tmp_dir
252
+ p
253
+ 3
254
+ I
255
+ 0
256
+ I
257
+ a
258
+ I
259
+ 4
260
+ x
261
+ 80
262
+ /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb
263
+ p
264
+ 0
265
+ x
266
+ 5
267
+ after
268
+ s
269
+ 51
270
+ should roll a file when it gets to a specified size
271
+ M
272
+ 1
273
+ p
274
+ 2
275
+ x
276
+ 9
277
+ for_block
278
+ t
279
+ n
280
+ x
281
+ 9
282
+ __block__
283
+ i
284
+ 258
285
+ 45
286
+ 0
287
+ 1
288
+ 5
289
+ 48
290
+ 2
291
+ 7
292
+ 3
293
+ 5
294
+ 7
295
+ 4
296
+ 47
297
+ 49
298
+ 5
299
+ 1
300
+ 47
301
+ 101
302
+ 6
303
+ 7
304
+ 7
305
+ 63
306
+ 3
307
+ 49
308
+ 8
309
+ 2
310
+ 19
311
+ 0
312
+ 15
313
+ 45
314
+ 9
315
+ 10
316
+ 43
317
+ 11
318
+ 43
319
+ 12
320
+ 13
321
+ 71
322
+ 13
323
+ 47
324
+ 9
325
+ 81
326
+ 47
327
+ 49
328
+ 14
329
+ 0
330
+ 13
331
+ 20
332
+ 0
333
+ 44
334
+ 43
335
+ 15
336
+ 80
337
+ 49
338
+ 16
339
+ 1
340
+ 13
341
+ 7
342
+ 17
343
+ 4
344
+ 40
345
+ 49
346
+ 18
347
+ 2
348
+ 15
349
+ 13
350
+ 7
351
+ 19
352
+ 7
353
+ 20
354
+ 64
355
+ 49
356
+ 18
357
+ 2
358
+ 15
359
+ 47
360
+ 49
361
+ 21
362
+ 2
363
+ 15
364
+ 8
365
+ 112
366
+ 20
367
+ 0
368
+ 44
369
+ 43
370
+ 15
371
+ 80
372
+ 49
373
+ 16
374
+ 1
375
+ 13
376
+ 7
377
+ 17
378
+ 4
379
+ 40
380
+ 49
381
+ 18
382
+ 2
383
+ 15
384
+ 13
385
+ 7
386
+ 19
387
+ 7
388
+ 20
389
+ 64
390
+ 49
391
+ 18
392
+ 2
393
+ 15
394
+ 49
395
+ 13
396
+ 2
397
+ 19
398
+ 1
399
+ 15
400
+ 45
401
+ 9
402
+ 22
403
+ 43
404
+ 23
405
+ 13
406
+ 71
407
+ 13
408
+ 47
409
+ 9
410
+ 155
411
+ 47
412
+ 49
413
+ 14
414
+ 0
415
+ 13
416
+ 20
417
+ 1
418
+ 44
419
+ 43
420
+ 15
421
+ 79
422
+ 49
423
+ 16
424
+ 1
425
+ 13
426
+ 7
427
+ 24
428
+ 80
429
+ 49
430
+ 18
431
+ 2
432
+ 15
433
+ 47
434
+ 49
435
+ 21
436
+ 2
437
+ 15
438
+ 8
439
+ 175
440
+ 20
441
+ 1
442
+ 44
443
+ 43
444
+ 15
445
+ 79
446
+ 49
447
+ 16
448
+ 1
449
+ 13
450
+ 7
451
+ 24
452
+ 80
453
+ 49
454
+ 18
455
+ 2
456
+ 15
457
+ 49
458
+ 13
459
+ 2
460
+ 19
461
+ 2
462
+ 15
463
+ 4
464
+ 4
465
+ 56
466
+ 25
467
+ 50
468
+ 26
469
+ 0
470
+ 15
471
+ 20
472
+ 2
473
+ 49
474
+ 27
475
+ 0
476
+ 15
477
+ 45
478
+ 0
479
+ 28
480
+ 20
481
+ 0
482
+ 47
483
+ 101
484
+ 6
485
+ 7
486
+ 29
487
+ 63
488
+ 2
489
+ 49
490
+ 30
491
+ 1
492
+ 45
493
+ 9
494
+ 31
495
+ 43
496
+ 32
497
+ 49
498
+ 33
499
+ 1
500
+ 49
501
+ 34
502
+ 0
503
+ 7
504
+ 35
505
+ 64
506
+ 7
507
+ 36
508
+ 64
509
+ 7
510
+ 37
511
+ 64
512
+ 35
513
+ 3
514
+ 83
515
+ 38
516
+ 15
517
+ 45
518
+ 0
519
+ 39
520
+ 20
521
+ 0
522
+ 49
523
+ 30
524
+ 1
525
+ 49
526
+ 34
527
+ 0
528
+ 7
529
+ 40
530
+ 45
531
+ 9
532
+ 41
533
+ 43
534
+ 32
535
+ 47
536
+ 101
537
+ 6
538
+ 63
539
+ 2
540
+ 83
541
+ 38
542
+ 11
543
+ I
544
+ b
545
+ I
546
+ 3
547
+ I
548
+ 0
549
+ I
550
+ 0
551
+ I
552
+ -2
553
+ p
554
+ 42
555
+ x
556
+ 4
557
+ File
558
+ n
559
+ x
560
+ 7
561
+ tmp_dir
562
+ s
563
+ 1
564
+ a
565
+ I
566
+ 3b9aca00
567
+ x
568
+ 4
569
+ rand
570
+ x
571
+ 4
572
+ to_s
573
+ s
574
+ 4
575
+ .log
576
+ x
577
+ 4
578
+ join
579
+ x
580
+ 10
581
+ Lumberjack
582
+ n
583
+ x
584
+ 6
585
+ Device
586
+ x
587
+ 18
588
+ SizeRollingLogFile
589
+ x
590
+ 3
591
+ new
592
+ x
593
+ 8
594
+ allocate
595
+ x
596
+ 4
597
+ Hash
598
+ x
599
+ 16
600
+ new_from_literal
601
+ x
602
+ 8
603
+ max_size
604
+ x
605
+ 3
606
+ []=
607
+ x
608
+ 8
609
+ template
610
+ s
611
+ 8
612
+ :message
613
+ x
614
+ 10
615
+ initialize
616
+ n
617
+ x
618
+ 6
619
+ Logger
620
+ x
621
+ 11
622
+ buffer_size
623
+ M
624
+ 1
625
+ p
626
+ 2
627
+ x
628
+ 9
629
+ for_block
630
+ t
631
+ n
632
+ x
633
+ 9
634
+ __block__
635
+ i
636
+ 30
637
+ 57
638
+ 19
639
+ 0
640
+ 15
641
+ 21
642
+ 1
643
+ 2
644
+ 7
645
+ 0
646
+ 20
647
+ 0
648
+ 79
649
+ 81
650
+ 1
651
+ 47
652
+ 101
653
+ 2
654
+ 63
655
+ 2
656
+ 49
657
+ 3
658
+ 1
659
+ 15
660
+ 21
661
+ 1
662
+ 2
663
+ 49
664
+ 4
665
+ 0
666
+ 11
667
+ I
668
+ 6
669
+ I
670
+ 1
671
+ I
672
+ 1
673
+ I
674
+ 1
675
+ n
676
+ p
677
+ 5
678
+ s
679
+ 13
680
+ test message
681
+ x
682
+ 1
683
+ +
684
+ x
685
+ 4
686
+ to_s
687
+ x
688
+ 5
689
+ error
690
+ x
691
+ 5
692
+ flush
693
+ p
694
+ 7
695
+ I
696
+ 0
697
+ I
698
+ 11
699
+ I
700
+ 4
701
+ I
702
+ 12
703
+ I
704
+ 17
705
+ I
706
+ 13
707
+ I
708
+ 1e
709
+ x
710
+ 80
711
+ /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb
712
+ p
713
+ 1
714
+ x
715
+ 1
716
+ i
717
+ x
718
+ 5
719
+ times
720
+ x
721
+ 5
722
+ close
723
+ n
724
+ s
725
+ 2
726
+ .1
727
+ x
728
+ 4
729
+ read
730
+ n
731
+ x
732
+ 14
733
+ LINE_SEPARATOR
734
+ x
735
+ 5
736
+ split
737
+ x
738
+ 6
739
+ should
740
+ s
741
+ 14
742
+ test message 1
743
+ s
744
+ 14
745
+ test message 2
746
+ s
747
+ 14
748
+ test message 3
749
+ x
750
+ 2
751
+ ==
752
+ n
753
+ s
754
+ 14
755
+ test message 4
756
+ n
757
+ p
758
+ 15
759
+ I
760
+ 0
761
+ I
762
+ e
763
+ I
764
+ 1c
765
+ I
766
+ f
767
+ I
768
+ 73
769
+ I
770
+ 10
771
+ I
772
+ b2
773
+ I
774
+ 11
775
+ I
776
+ ba
777
+ I
778
+ 15
779
+ I
780
+ c0
781
+ I
782
+ 17
783
+ I
784
+ e8
785
+ I
786
+ 18
787
+ I
788
+ 102
789
+ x
790
+ 80
791
+ /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb
792
+ p
793
+ 3
794
+ x
795
+ 8
796
+ log_file
797
+ x
798
+ 6
799
+ device
800
+ x
801
+ 6
802
+ logger
803
+ x
804
+ 2
805
+ it
806
+ s
807
+ 51
808
+ should be able to specify the max size in kilobytes
809
+ M
810
+ 1
811
+ p
812
+ 2
813
+ x
814
+ 9
815
+ for_block
816
+ t
817
+ n
818
+ x
819
+ 9
820
+ __block__
821
+ i
822
+ 110
823
+ 45
824
+ 0
825
+ 1
826
+ 5
827
+ 48
828
+ 2
829
+ 7
830
+ 3
831
+ 5
832
+ 7
833
+ 4
834
+ 47
835
+ 49
836
+ 5
837
+ 1
838
+ 47
839
+ 101
840
+ 6
841
+ 7
842
+ 7
843
+ 63
844
+ 3
845
+ 49
846
+ 8
847
+ 2
848
+ 19
849
+ 0
850
+ 15
851
+ 45
852
+ 9
853
+ 10
854
+ 43
855
+ 11
856
+ 43
857
+ 12
858
+ 13
859
+ 71
860
+ 13
861
+ 47
862
+ 9
863
+ 72
864
+ 47
865
+ 49
866
+ 14
867
+ 0
868
+ 13
869
+ 20
870
+ 0
871
+ 44
872
+ 43
873
+ 15
874
+ 79
875
+ 49
876
+ 16
877
+ 1
878
+ 13
879
+ 7
880
+ 17
881
+ 7
882
+ 18
883
+ 64
884
+ 49
885
+ 19
886
+ 2
887
+ 15
888
+ 47
889
+ 49
890
+ 20
891
+ 2
892
+ 15
893
+ 8
894
+ 94
895
+ 20
896
+ 0
897
+ 44
898
+ 43
899
+ 15
900
+ 79
901
+ 49
902
+ 16
903
+ 1
904
+ 13
905
+ 7
906
+ 17
907
+ 7
908
+ 18
909
+ 64
910
+ 49
911
+ 19
912
+ 2
913
+ 15
914
+ 49
915
+ 13
916
+ 2
917
+ 19
918
+ 1
919
+ 15
920
+ 20
921
+ 1
922
+ 49
923
+ 17
924
+ 0
925
+ 49
926
+ 21
927
+ 0
928
+ 7
929
+ 22
930
+ 83
931
+ 23
932
+ 11
933
+ I
934
+ a
935
+ I
936
+ 2
937
+ I
938
+ 0
939
+ I
940
+ 0
941
+ I
942
+ -2
943
+ p
944
+ 24
945
+ x
946
+ 4
947
+ File
948
+ n
949
+ x
950
+ 7
951
+ tmp_dir
952
+ s
953
+ 1
954
+ b
955
+ I
956
+ 3b9aca00
957
+ x
958
+ 4
959
+ rand
960
+ x
961
+ 4
962
+ to_s
963
+ s
964
+ 4
965
+ .log
966
+ x
967
+ 4
968
+ join
969
+ x
970
+ 10
971
+ Lumberjack
972
+ n
973
+ x
974
+ 6
975
+ Device
976
+ x
977
+ 18
978
+ SizeRollingLogFile
979
+ x
980
+ 3
981
+ new
982
+ x
983
+ 8
984
+ allocate
985
+ x
986
+ 4
987
+ Hash
988
+ x
989
+ 16
990
+ new_from_literal
991
+ x
992
+ 8
993
+ max_size
994
+ s
995
+ 3
996
+ 32K
997
+ x
998
+ 3
999
+ []=
1000
+ x
1001
+ 10
1002
+ initialize
1003
+ x
1004
+ 6
1005
+ should
1006
+ I
1007
+ 8000
1008
+ x
1009
+ 2
1010
+ ==
1011
+ p
1012
+ 7
1013
+ I
1014
+ 0
1015
+ I
1016
+ 1c
1017
+ I
1018
+ 1c
1019
+ I
1020
+ 1d
1021
+ I
1022
+ 61
1023
+ I
1024
+ 1e
1025
+ I
1026
+ 6e
1027
+ x
1028
+ 80
1029
+ /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb
1030
+ p
1031
+ 2
1032
+ x
1033
+ 8
1034
+ log_file
1035
+ x
1036
+ 6
1037
+ device
1038
+ s
1039
+ 51
1040
+ should be able to specify the max size in megabytes
1041
+ M
1042
+ 1
1043
+ p
1044
+ 2
1045
+ x
1046
+ 9
1047
+ for_block
1048
+ t
1049
+ n
1050
+ x
1051
+ 9
1052
+ __block__
1053
+ i
1054
+ 110
1055
+ 45
1056
+ 0
1057
+ 1
1058
+ 5
1059
+ 48
1060
+ 2
1061
+ 7
1062
+ 3
1063
+ 5
1064
+ 7
1065
+ 4
1066
+ 47
1067
+ 49
1068
+ 5
1069
+ 1
1070
+ 47
1071
+ 101
1072
+ 6
1073
+ 7
1074
+ 7
1075
+ 63
1076
+ 3
1077
+ 49
1078
+ 8
1079
+ 2
1080
+ 19
1081
+ 0
1082
+ 15
1083
+ 45
1084
+ 9
1085
+ 10
1086
+ 43
1087
+ 11
1088
+ 43
1089
+ 12
1090
+ 13
1091
+ 71
1092
+ 13
1093
+ 47
1094
+ 9
1095
+ 72
1096
+ 47
1097
+ 49
1098
+ 14
1099
+ 0
1100
+ 13
1101
+ 20
1102
+ 0
1103
+ 44
1104
+ 43
1105
+ 15
1106
+ 79
1107
+ 49
1108
+ 16
1109
+ 1
1110
+ 13
1111
+ 7
1112
+ 17
1113
+ 7
1114
+ 18
1115
+ 64
1116
+ 49
1117
+ 19
1118
+ 2
1119
+ 15
1120
+ 47
1121
+ 49
1122
+ 20
1123
+ 2
1124
+ 15
1125
+ 8
1126
+ 94
1127
+ 20
1128
+ 0
1129
+ 44
1130
+ 43
1131
+ 15
1132
+ 79
1133
+ 49
1134
+ 16
1135
+ 1
1136
+ 13
1137
+ 7
1138
+ 17
1139
+ 7
1140
+ 18
1141
+ 64
1142
+ 49
1143
+ 19
1144
+ 2
1145
+ 15
1146
+ 49
1147
+ 13
1148
+ 2
1149
+ 19
1150
+ 1
1151
+ 15
1152
+ 20
1153
+ 1
1154
+ 49
1155
+ 17
1156
+ 0
1157
+ 49
1158
+ 21
1159
+ 0
1160
+ 7
1161
+ 22
1162
+ 83
1163
+ 23
1164
+ 11
1165
+ I
1166
+ a
1167
+ I
1168
+ 2
1169
+ I
1170
+ 0
1171
+ I
1172
+ 0
1173
+ I
1174
+ -2
1175
+ p
1176
+ 24
1177
+ x
1178
+ 4
1179
+ File
1180
+ n
1181
+ x
1182
+ 7
1183
+ tmp_dir
1184
+ s
1185
+ 1
1186
+ c
1187
+ I
1188
+ 3b9aca00
1189
+ x
1190
+ 4
1191
+ rand
1192
+ x
1193
+ 4
1194
+ to_s
1195
+ s
1196
+ 4
1197
+ .log
1198
+ x
1199
+ 4
1200
+ join
1201
+ x
1202
+ 10
1203
+ Lumberjack
1204
+ n
1205
+ x
1206
+ 6
1207
+ Device
1208
+ x
1209
+ 18
1210
+ SizeRollingLogFile
1211
+ x
1212
+ 3
1213
+ new
1214
+ x
1215
+ 8
1216
+ allocate
1217
+ x
1218
+ 4
1219
+ Hash
1220
+ x
1221
+ 16
1222
+ new_from_literal
1223
+ x
1224
+ 8
1225
+ max_size
1226
+ s
1227
+ 4
1228
+ 100M
1229
+ x
1230
+ 3
1231
+ []=
1232
+ x
1233
+ 10
1234
+ initialize
1235
+ x
1236
+ 6
1237
+ should
1238
+ I
1239
+ 6400000
1240
+ x
1241
+ 2
1242
+ ==
1243
+ p
1244
+ 7
1245
+ I
1246
+ 0
1247
+ I
1248
+ 22
1249
+ I
1250
+ 1c
1251
+ I
1252
+ 23
1253
+ I
1254
+ 61
1255
+ I
1256
+ 24
1257
+ I
1258
+ 6e
1259
+ x
1260
+ 80
1261
+ /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb
1262
+ p
1263
+ 2
1264
+ x
1265
+ 8
1266
+ log_file
1267
+ x
1268
+ 6
1269
+ device
1270
+ s
1271
+ 51
1272
+ should be able to specify the max size in gigabytes
1273
+ M
1274
+ 1
1275
+ p
1276
+ 2
1277
+ x
1278
+ 9
1279
+ for_block
1280
+ t
1281
+ n
1282
+ x
1283
+ 9
1284
+ __block__
1285
+ i
1286
+ 110
1287
+ 45
1288
+ 0
1289
+ 1
1290
+ 5
1291
+ 48
1292
+ 2
1293
+ 7
1294
+ 3
1295
+ 5
1296
+ 7
1297
+ 4
1298
+ 47
1299
+ 49
1300
+ 5
1301
+ 1
1302
+ 47
1303
+ 101
1304
+ 6
1305
+ 7
1306
+ 7
1307
+ 63
1308
+ 3
1309
+ 49
1310
+ 8
1311
+ 2
1312
+ 19
1313
+ 0
1314
+ 15
1315
+ 45
1316
+ 9
1317
+ 10
1318
+ 43
1319
+ 11
1320
+ 43
1321
+ 12
1322
+ 13
1323
+ 71
1324
+ 13
1325
+ 47
1326
+ 9
1327
+ 72
1328
+ 47
1329
+ 49
1330
+ 14
1331
+ 0
1332
+ 13
1333
+ 20
1334
+ 0
1335
+ 44
1336
+ 43
1337
+ 15
1338
+ 79
1339
+ 49
1340
+ 16
1341
+ 1
1342
+ 13
1343
+ 7
1344
+ 17
1345
+ 7
1346
+ 18
1347
+ 64
1348
+ 49
1349
+ 19
1350
+ 2
1351
+ 15
1352
+ 47
1353
+ 49
1354
+ 20
1355
+ 2
1356
+ 15
1357
+ 8
1358
+ 94
1359
+ 20
1360
+ 0
1361
+ 44
1362
+ 43
1363
+ 15
1364
+ 79
1365
+ 49
1366
+ 16
1367
+ 1
1368
+ 13
1369
+ 7
1370
+ 17
1371
+ 7
1372
+ 18
1373
+ 64
1374
+ 49
1375
+ 19
1376
+ 2
1377
+ 15
1378
+ 49
1379
+ 13
1380
+ 2
1381
+ 19
1382
+ 1
1383
+ 15
1384
+ 20
1385
+ 1
1386
+ 49
1387
+ 17
1388
+ 0
1389
+ 49
1390
+ 21
1391
+ 0
1392
+ 7
1393
+ 22
1394
+ 83
1395
+ 23
1396
+ 11
1397
+ I
1398
+ a
1399
+ I
1400
+ 2
1401
+ I
1402
+ 0
1403
+ I
1404
+ 0
1405
+ I
1406
+ -2
1407
+ p
1408
+ 24
1409
+ x
1410
+ 4
1411
+ File
1412
+ n
1413
+ x
1414
+ 7
1415
+ tmp_dir
1416
+ s
1417
+ 1
1418
+ d
1419
+ I
1420
+ 3b9aca00
1421
+ x
1422
+ 4
1423
+ rand
1424
+ x
1425
+ 4
1426
+ to_s
1427
+ s
1428
+ 4
1429
+ .log
1430
+ x
1431
+ 4
1432
+ join
1433
+ x
1434
+ 10
1435
+ Lumberjack
1436
+ n
1437
+ x
1438
+ 6
1439
+ Device
1440
+ x
1441
+ 18
1442
+ SizeRollingLogFile
1443
+ x
1444
+ 3
1445
+ new
1446
+ x
1447
+ 8
1448
+ allocate
1449
+ x
1450
+ 4
1451
+ Hash
1452
+ x
1453
+ 16
1454
+ new_from_literal
1455
+ x
1456
+ 8
1457
+ max_size
1458
+ s
1459
+ 2
1460
+ 1G
1461
+ x
1462
+ 3
1463
+ []=
1464
+ x
1465
+ 10
1466
+ initialize
1467
+ x
1468
+ 6
1469
+ should
1470
+ I
1471
+ 40000000
1472
+ x
1473
+ 2
1474
+ ==
1475
+ p
1476
+ 7
1477
+ I
1478
+ 0
1479
+ I
1480
+ 28
1481
+ I
1482
+ 1c
1483
+ I
1484
+ 29
1485
+ I
1486
+ 61
1487
+ I
1488
+ 2a
1489
+ I
1490
+ 6e
1491
+ x
1492
+ 80
1493
+ /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb
1494
+ p
1495
+ 2
1496
+ x
1497
+ 8
1498
+ log_file
1499
+ x
1500
+ 6
1501
+ device
1502
+ s
1503
+ 54
1504
+ should figure out the next archive file name available
1505
+ M
1506
+ 1
1507
+ p
1508
+ 2
1509
+ x
1510
+ 9
1511
+ for_block
1512
+ t
1513
+ n
1514
+ x
1515
+ 9
1516
+ __block__
1517
+ i
1518
+ 120
1519
+ 45
1520
+ 0
1521
+ 1
1522
+ 5
1523
+ 48
1524
+ 2
1525
+ 7
1526
+ 3
1527
+ 64
1528
+ 49
1529
+ 4
1530
+ 2
1531
+ 19
1532
+ 0
1533
+ 15
1534
+ 44
1535
+ 43
1536
+ 5
1537
+ 4
1538
+ 3
1539
+ 4
1540
+ 11
1541
+ 49
1542
+ 6
1543
+ 2
1544
+ 56
1545
+ 7
1546
+ 50
1547
+ 8
1548
+ 0
1549
+ 15
1550
+ 45
1551
+ 9
1552
+ 10
1553
+ 43
1554
+ 11
1555
+ 43
1556
+ 12
1557
+ 13
1558
+ 71
1559
+ 6
1560
+ 47
1561
+ 9
1562
+ 75
1563
+ 47
1564
+ 49
1565
+ 13
1566
+ 0
1567
+ 13
1568
+ 20
1569
+ 0
1570
+ 44
1571
+ 43
1572
+ 14
1573
+ 79
1574
+ 49
1575
+ 15
1576
+ 1
1577
+ 13
1578
+ 7
1579
+ 16
1580
+ 7
1581
+ 17
1582
+ 64
1583
+ 49
1584
+ 18
1585
+ 2
1586
+ 15
1587
+ 47
1588
+ 49
1589
+ 19
1590
+ 2
1591
+ 15
1592
+ 8
1593
+ 97
1594
+ 20
1595
+ 0
1596
+ 44
1597
+ 43
1598
+ 14
1599
+ 79
1600
+ 49
1601
+ 15
1602
+ 1
1603
+ 13
1604
+ 7
1605
+ 16
1606
+ 7
1607
+ 17
1608
+ 64
1609
+ 49
1610
+ 18
1611
+ 2
1612
+ 15
1613
+ 49
1614
+ 6
1615
+ 2
1616
+ 19
1617
+ 1
1618
+ 15
1619
+ 20
1620
+ 1
1621
+ 49
1622
+ 20
1623
+ 0
1624
+ 49
1625
+ 21
1626
+ 0
1627
+ 20
1628
+ 0
1629
+ 47
1630
+ 101
1631
+ 22
1632
+ 7
1633
+ 23
1634
+ 63
1635
+ 2
1636
+ 83
1637
+ 24
1638
+ 11
1639
+ I
1640
+ a
1641
+ I
1642
+ 2
1643
+ I
1644
+ 0
1645
+ I
1646
+ 0
1647
+ I
1648
+ -2
1649
+ p
1650
+ 25
1651
+ x
1652
+ 4
1653
+ File
1654
+ n
1655
+ x
1656
+ 7
1657
+ tmp_dir
1658
+ s
1659
+ 12
1660
+ filename.log
1661
+ x
1662
+ 4
1663
+ join
1664
+ x
1665
+ 5
1666
+ Range
1667
+ x
1668
+ 3
1669
+ new
1670
+ M
1671
+ 1
1672
+ p
1673
+ 2
1674
+ x
1675
+ 9
1676
+ for_block
1677
+ t
1678
+ n
1679
+ x
1680
+ 9
1681
+ __block__
1682
+ i
1683
+ 31
1684
+ 57
1685
+ 19
1686
+ 0
1687
+ 15
1688
+ 45
1689
+ 0
1690
+ 1
1691
+ 21
1692
+ 1
1693
+ 0
1694
+ 47
1695
+ 101
1696
+ 2
1697
+ 7
1698
+ 3
1699
+ 20
1700
+ 0
1701
+ 47
1702
+ 101
1703
+ 2
1704
+ 63
1705
+ 3
1706
+ 7
1707
+ 4
1708
+ 64
1709
+ 56
1710
+ 5
1711
+ 50
1712
+ 6
1713
+ 2
1714
+ 11
1715
+ I
1716
+ 6
1717
+ I
1718
+ 1
1719
+ I
1720
+ 1
1721
+ I
1722
+ 1
1723
+ n
1724
+ p
1725
+ 7
1726
+ x
1727
+ 4
1728
+ File
1729
+ n
1730
+ x
1731
+ 4
1732
+ to_s
1733
+ s
1734
+ 1
1735
+ .
1736
+ s
1737
+ 1
1738
+ w
1739
+ M
1740
+ 1
1741
+ p
1742
+ 2
1743
+ x
1744
+ 9
1745
+ for_block
1746
+ t
1747
+ n
1748
+ x
1749
+ 9
1750
+ __block__
1751
+ i
1752
+ 16
1753
+ 57
1754
+ 19
1755
+ 0
1756
+ 15
1757
+ 20
1758
+ 0
1759
+ 21
1760
+ 1
1761
+ 0
1762
+ 49
1763
+ 0
1764
+ 0
1765
+ 49
1766
+ 1
1767
+ 1
1768
+ 11
1769
+ I
1770
+ 4
1771
+ I
1772
+ 1
1773
+ I
1774
+ 1
1775
+ I
1776
+ 1
1777
+ n
1778
+ p
1779
+ 2
1780
+ x
1781
+ 4
1782
+ to_s
1783
+ x
1784
+ 5
1785
+ write
1786
+ p
1787
+ 3
1788
+ I
1789
+ 0
1790
+ I
1791
+ 30
1792
+ I
1793
+ 10
1794
+ x
1795
+ 80
1796
+ /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb
1797
+ p
1798
+ 1
1799
+ x
1800
+ 1
1801
+ f
1802
+ x
1803
+ 4
1804
+ open
1805
+ p
1806
+ 5
1807
+ I
1808
+ 0
1809
+ I
1810
+ 2f
1811
+ I
1812
+ 4
1813
+ I
1814
+ 30
1815
+ I
1816
+ 1f
1817
+ x
1818
+ 80
1819
+ /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb
1820
+ p
1821
+ 1
1822
+ x
1823
+ 1
1824
+ i
1825
+ x
1826
+ 4
1827
+ each
1828
+ x
1829
+ 10
1830
+ Lumberjack
1831
+ n
1832
+ x
1833
+ 6
1834
+ Device
1835
+ x
1836
+ 18
1837
+ SizeRollingLogFile
1838
+ x
1839
+ 8
1840
+ allocate
1841
+ x
1842
+ 4
1843
+ Hash
1844
+ x
1845
+ 16
1846
+ new_from_literal
1847
+ x
1848
+ 8
1849
+ max_size
1850
+ s
1851
+ 4
1852
+ 100M
1853
+ x
1854
+ 3
1855
+ []=
1856
+ x
1857
+ 10
1858
+ initialize
1859
+ x
1860
+ 17
1861
+ archive_file_name
1862
+ x
1863
+ 6
1864
+ should
1865
+ x
1866
+ 4
1867
+ to_s
1868
+ s
1869
+ 3
1870
+ .12
1871
+ x
1872
+ 2
1873
+ ==
1874
+ p
1875
+ 9
1876
+ I
1877
+ 0
1878
+ I
1879
+ 2e
1880
+ I
1881
+ f
1882
+ I
1883
+ 2f
1884
+ I
1885
+ 1f
1886
+ I
1887
+ 32
1888
+ I
1889
+ 64
1890
+ I
1891
+ 33
1892
+ I
1893
+ 78
1894
+ x
1895
+ 80
1896
+ /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb
1897
+ p
1898
+ 2
1899
+ x
1900
+ 8
1901
+ log_file
1902
+ x
1903
+ 6
1904
+ device
1905
+ p
1906
+ 15
1907
+ I
1908
+ 0
1909
+ I
1910
+ 5
1911
+ I
1912
+ a
1913
+ I
1914
+ 9
1915
+ I
1916
+ 14
1917
+ I
1918
+ d
1919
+ I
1920
+ 1f
1921
+ I
1922
+ 1b
1923
+ I
1924
+ 2a
1925
+ I
1926
+ 21
1927
+ I
1928
+ 35
1929
+ I
1930
+ 27
1931
+ I
1932
+ 40
1933
+ I
1934
+ 2d
1935
+ I
1936
+ 4b
1937
+ x
1938
+ 80
1939
+ /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb
1940
+ p
1941
+ 0
1942
+ x
1943
+ 8
1944
+ describe
1945
+ p
1946
+ 5
1947
+ I
1948
+ 0
1949
+ I
1950
+ 1
1951
+ I
1952
+ 9
1953
+ I
1954
+ 3
1955
+ I
1956
+ 1a
1957
+ x
1958
+ 80
1959
+ /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb
1960
+ p
1961
+ 0