!RBIX 0 x M 1 n n x 10 __script__ i 26 5 7 0 64 47 49 1 1 15 5 45 2 3 43 4 43 5 56 6 47 50 7 1 15 2 11 I 3 I 0 I 0 I 0 n p 8 s 11 spec_helper x 7 require x 10 Lumberjack n x 6 Device x 6 Stream M 1 p 2 x 9 for_block t n x 9 __block__ i 139 5 7 0 56 1 47 50 2 1 15 5 7 3 56 4 47 50 2 1 15 5 7 5 56 6 47 50 2 1 15 5 7 7 56 8 47 50 2 1 15 5 7 9 64 56 10 47 50 11 1 15 5 7 12 64 56 13 47 50 11 1 15 5 7 14 64 56 15 47 50 11 1 15 5 7 16 64 56 17 47 50 11 1 15 5 7 18 64 56 19 47 50 11 1 15 5 7 20 64 56 21 47 50 11 1 15 5 7 22 64 56 23 47 50 11 1 15 5 7 24 64 56 25 47 50 11 1 15 5 7 26 64 56 27 47 50 28 1 11 I 4 I 0 I 0 I 0 I -2 p 29 x 11 time_string M 1 p 2 x 9 for_block t n x 9 __block__ i 4 7 0 64 11 I 2 I 0 I 0 I 0 I -2 p 1 s 23 2011-01-15T14:23:45.123 p 3 I 0 I 5 I 4 x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 0 x 3 let x 4 time M 1 p 2 x 9 for_block t n x 9 __block__ i 10 45 0 1 5 48 2 49 3 1 11 I 3 I 0 I 0 I 0 I -2 p 4 x 4 Time n x 11 time_string x 5 parse p 3 I 0 I 6 I a x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 0 x 6 stream M 1 p 2 x 9 for_block t n x 9 __block__ i 25 45 0 1 13 71 2 47 9 21 47 49 3 0 13 47 49 4 0 15 8 24 49 2 0 11 I 3 I 0 I 0 I 0 I -2 p 5 x 8 StringIO n x 3 new x 8 allocate x 10 initialize p 3 I 0 I 7 I 19 x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 0 x 5 entry M 1 p 2 x 9 for_block t n x 9 __block__ i 69 45 0 1 43 2 13 71 3 47 9 44 47 49 4 0 13 5 48 5 45 0 6 43 7 43 8 7 9 64 7 10 64 7 11 7 12 64 47 49 13 6 15 8 68 5 48 5 45 0 14 43 7 43 8 7 9 64 7 10 64 7 11 7 12 64 49 3 6 11 I 9 I 0 I 0 I 0 I -2 p 15 x 10 Lumberjack n x 5 Entry x 3 new x 8 allocate x 4 time n x 6 Logger x 4 INFO s 12 test message s 3 app I 3039 s 4 ABCD x 10 initialize n p 3 I 0 I 8 I 45 x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 0 s 57 should buffer output and not write directly to the stream M 1 p 2 x 9 for_block t n x 9 __block__ i 125 45 0 1 43 2 43 3 13 71 4 47 9 45 47 49 5 0 13 5 48 6 44 43 7 79 49 8 1 13 7 9 7 10 64 49 11 2 15 47 49 12 2 15 8 68 5 48 6 44 43 7 79 49 8 1 13 7 9 7 10 64 49 11 2 15 49 4 2 19 0 15 20 0 5 48 13 49 14 1 15 5 48 6 49 15 0 49 16 0 7 17 64 83 18 15 20 0 49 19 0 15 5 48 6 49 15 0 49 16 0 7 20 45 0 21 43 22 47 101 23 63 2 83 18 11 I 9 I 1 I 0 I 0 I -2 p 24 x 10 Lumberjack n x 6 Device x 6 Stream x 3 new x 8 allocate x 6 stream x 4 Hash x 16 new_from_literal x 8 template s 8 :message x 3 []= x 10 initialize x 5 entry x 5 write x 6 string x 6 should s 0 x 2 == x 5 flush s 12 test message n x 14 LINE_SEPARATOR x 4 to_s p 11 I 0 I b I 47 I c I 50 I d I 5f I e I 65 I f I 7d x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 1 x 6 device x 2 it s 58 should flush the buffer when it gets to the specified size M 1 p 2 x 9 for_block t n x 9 __block__ i 156 45 0 1 43 2 43 3 13 71 4 47 9 54 47 49 5 0 13 5 48 6 44 43 7 80 49 8 1 13 7 9 4 15 49 10 2 15 13 7 11 7 12 64 49 10 2 15 47 49 13 2 15 8 86 5 48 6 44 43 7 80 49 8 1 13 7 9 4 15 49 10 2 15 13 7 11 7 12 64 49 10 2 15 49 4 2 19 0 15 20 0 5 48 14 49 15 1 15 5 48 6 49 16 0 49 17 0 7 18 64 83 19 15 20 0 5 48 14 49 15 1 15 5 48 6 49 16 0 49 17 0 7 20 45 0 21 43 22 47 101 23 7 20 45 0 24 43 22 47 101 23 63 4 83 19 11 I 9 I 1 I 0 I 0 I -2 p 25 x 10 Lumberjack n x 6 Device x 6 Stream x 3 new x 8 allocate x 6 stream x 4 Hash x 16 new_from_literal x 11 buffer_size x 3 []= x 8 template s 8 :message x 10 initialize x 5 entry x 5 write x 6 string x 6 should s 0 x 2 == s 12 test message n x 14 LINE_SEPARATOR x 4 to_s n p 11 I 0 I 13 I 59 I 14 I 62 I 15 I 71 I 16 I 7a I 17 I 9c x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 1 x 6 device s 37 should be able to set the buffer size M 1 p 2 x 9 for_block t n x 9 __block__ i 107 45 0 1 43 2 43 3 13 71 4 47 9 44 47 49 5 0 13 5 48 6 44 43 7 79 49 8 1 13 7 9 4 15 49 10 2 15 47 49 11 2 15 8 66 5 48 6 44 43 7 79 49 8 1 13 7 9 4 15 49 10 2 15 49 4 2 19 0 15 20 0 49 9 0 49 12 0 4 15 83 13 15 20 0 4 100 13 18 2 49 14 1 15 15 20 0 49 9 0 49 12 0 4 100 83 13 11 I 9 I 1 I 0 I 0 I -2 p 15 x 10 Lumberjack n x 6 Device x 6 Stream x 3 new x 8 allocate x 6 stream x 4 Hash x 16 new_from_literal x 11 buffer_size x 3 []= x 10 initialize x 6 should x 2 == x 12 buffer_size= p 9 I 0 I 1b I 45 I 1c I 52 I 1d I 5e I 1e I 6b x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 1 x 6 device s 40 should have a default buffer size of 32K M 1 p 2 x 9 for_block t n x 9 __block__ i 50 45 0 1 43 2 43 3 13 71 4 47 9 28 47 49 5 0 13 5 48 6 47 49 7 1 15 8 34 5 48 6 49 4 1 19 0 15 20 0 49 8 0 49 9 0 7 10 83 11 11 I 5 I 1 I 0 I 0 I -2 p 12 x 10 Lumberjack n x 6 Device x 6 Stream x 3 new x 8 allocate x 6 stream x 10 initialize x 11 buffer_size x 6 should I 8000 x 2 == p 5 I 0 I 22 I 25 I 23 I 32 x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 1 x 6 device s 62 should write entries out to the stream with a default template M 1 p 2 x 9 for_block t n x 9 __block__ i 76 45 0 1 43 2 43 3 13 71 4 47 9 28 47 49 5 0 13 5 48 6 47 49 7 1 15 8 34 5 48 6 49 4 1 19 0 15 20 0 5 48 8 49 9 1 15 20 0 49 10 0 15 5 48 6 49 11 0 49 12 0 7 13 45 0 14 43 15 47 101 16 63 2 83 17 11 I 5 I 1 I 0 I 0 I -2 p 18 x 10 Lumberjack n x 6 Device x 6 Stream x 3 new x 8 allocate x 6 stream x 10 initialize x 5 entry x 5 write x 5 flush x 6 string x 6 should s 60 2011-01-15T14:23:45.123 INFO [app(12345) #ABCD] test message n x 14 LINE_SEPARATOR x 4 to_s x 2 == p 9 I 0 I 27 I 25 I 28 I 2e I 29 I 34 I 2a I 4c x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 1 x 6 device s 61 should write entries out to the stream with a custom template M 1 p 2 x 9 for_block t n x 9 __block__ i 110 45 0 1 43 2 43 3 13 71 4 47 9 45 47 49 5 0 13 5 48 6 44 43 7 79 49 8 1 13 7 9 7 10 64 49 11 2 15 47 49 12 2 15 8 68 5 48 6 44 43 7 79 49 8 1 13 7 9 7 10 64 49 11 2 15 49 4 2 19 0 15 20 0 5 48 13 49 14 1 15 20 0 49 15 0 15 5 48 6 49 16 0 49 17 0 7 18 45 0 19 43 20 47 101 21 63 2 83 22 11 I 9 I 1 I 0 I 0 I -2 p 23 x 10 Lumberjack n x 6 Device x 6 Stream x 3 new x 8 allocate x 6 stream x 4 Hash x 16 new_from_literal x 8 template s 8 :message x 3 []= x 10 initialize x 5 entry x 5 write x 5 flush x 6 string x 6 should s 12 test message n x 14 LINE_SEPARATOR x 4 to_s x 2 == p 9 I 0 I 2e I 47 I 2f I 50 I 30 I 56 I 31 I 6e x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 1 x 6 device s 58 should be able to specify the time format for the template M 1 p 2 x 9 for_block t n x 9 __block__ i 108 45 0 1 43 2 43 3 13 71 4 47 9 44 47 49 5 0 13 5 48 6 44 43 7 79 49 8 1 13 7 9 7 10 49 11 2 15 47 49 12 2 15 8 66 5 48 6 44 43 7 79 49 8 1 13 7 9 7 10 49 11 2 15 49 4 2 19 0 15 20 0 5 48 13 49 14 1 15 20 0 49 15 0 15 5 48 6 49 16 0 49 17 0 7 18 45 0 19 43 20 47 101 21 63 2 83 22 11 I 9 I 1 I 0 I 0 I -2 p 23 x 10 Lumberjack n x 6 Device x 6 Stream x 3 new x 8 allocate x 6 stream x 4 Hash x 16 new_from_literal x 11 time_format x 12 microseconds x 3 []= x 10 initialize x 5 entry x 5 write x 5 flush x 6 string x 6 should s 63 2011-01-15T14:23:45.123000 INFO [app(12345) #ABCD] test message n x 14 LINE_SEPARATOR x 4 to_s x 2 == p 9 I 0 I 35 I 45 I 36 I 4e I 37 I 54 I 38 I 6c x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 1 x 6 device s 58 should be able to specify a block template for log entries M 1 p 2 x 9 for_block t n x 9 __block__ i 118 45 0 1 43 2 43 3 13 71 4 47 9 49 47 49 5 0 13 5 48 6 44 43 7 79 49 8 1 13 7 9 5 56 10 47 50 11 0 49 12 2 15 47 49 13 2 15 8 76 5 48 6 44 43 7 79 49 8 1 13 7 9 5 56 14 47 50 11 0 49 12 2 15 49 4 2 19 0 15 20 0 5 48 15 49 16 1 15 20 0 49 17 0 15 5 48 6 49 18 0 49 19 0 7 20 45 0 21 43 22 47 101 23 63 2 83 24 11 I a I 1 I 0 I 0 I -2 p 25 x 10 Lumberjack n x 6 Device x 6 Stream x 3 new x 8 allocate x 6 stream x 4 Hash x 16 new_from_literal x 8 template M 1 p 2 x 9 for_block t n x 9 __block__ i 13 57 19 0 15 20 0 49 0 0 49 1 0 11 I 3 I 1 I 1 I 1 n p 2 x 7 message x 6 upcase p 3 I 0 I 3c I d x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 1 x 1 e x 6 lambda x 3 []= x 10 initialize M 1 p 2 x 9 for_block t n x 9 __block__ i 13 57 19 0 15 20 0 49 0 0 49 1 0 11 I 3 I 1 I 1 I 1 n p 2 x 7 message x 6 upcase p 3 I 0 I 3c I d x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 1 x 1 e x 5 entry x 5 write x 5 flush x 6 string x 6 should s 12 TEST MESSAGE n x 14 LINE_SEPARATOR x 4 to_s x 2 == p 9 I 0 I 3c I 4f I 3d I 58 I 3e I 5e I 3f I 76 x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 1 x 6 device s 19 multi line messages M 1 p 2 x 9 for_block t n x 9 __block__ i 42 5 7 0 56 1 47 50 2 1 15 5 7 3 56 4 47 50 2 1 15 5 7 5 64 56 6 47 50 7 1 15 5 7 8 64 56 9 47 50 7 1 11 I 4 I 0 I 0 I 0 I -2 p 10 x 7 message M 1 p 2 x 9 for_block t n x 9 __block__ i 25 7 0 45 1 2 43 3 47 101 4 7 5 45 1 6 43 3 47 101 4 7 7 63 5 11 I 6 I 0 I 0 I 0 I -2 p 8 s 6 line 1 x 10 Lumberjack n x 14 LINE_SEPARATOR x 4 to_s s 6 line 2 n s 6 line 3 p 3 I 0 I 43 I 19 x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 0 x 3 let x 5 entry M 1 p 2 x 9 for_block t n x 9 __block__ i 69 45 0 1 43 2 13 71 3 47 9 44 47 49 4 0 13 5 48 5 45 0 6 43 7 43 8 5 48 9 7 10 64 7 11 7 12 64 47 49 13 6 15 8 68 5 48 5 45 0 14 43 7 43 8 5 48 9 7 10 64 7 11 7 12 64 49 3 6 11 I 9 I 0 I 0 I 0 I -2 p 15 x 10 Lumberjack n x 5 Entry x 3 new x 8 allocate x 4 time n x 6 Logger x 4 INFO x 7 message s 3 app I 3039 s 4 ABCD x 10 initialize n p 3 I 0 I 44 I 45 x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 0 s 53 should have a default template for multiline messages M 1 p 2 x 9 for_block t n x 9 __block__ i 83 45 0 1 43 2 43 3 13 71 4 47 9 28 47 49 5 0 13 5 48 6 47 49 7 1 15 8 34 5 48 6 49 4 1 19 0 15 20 0 5 48 8 49 9 1 15 20 0 49 10 0 15 5 48 6 49 11 0 45 0 12 43 13 49 14 1 49 15 0 7 16 64 7 17 64 7 18 64 35 3 83 19 11 I 6 I 1 I 0 I 0 I -2 p 20 x 10 Lumberjack n x 6 Device x 6 Stream x 3 new x 8 allocate x 6 stream x 10 initialize x 5 entry x 5 write x 5 flush x 6 string n x 14 LINE_SEPARATOR x 5 split x 6 should s 54 2011-01-15T14:23:45.123 INFO [app(12345) #ABCD] line 1 s 16 > [#ABCD] line 2 s 16 > [#ABCD] line 3 x 2 == p 9 I 0 I 47 I 25 I 48 I 2e I 49 I 34 I 4a I 53 x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 1 x 6 device x 2 it s 63 should be able to specify a template for multiple line messages M 1 p 2 x 9 for_block t n x 9 __block__ i 110 45 0 1 43 2 43 3 13 71 4 47 9 45 47 49 5 0 13 5 48 6 44 43 7 79 49 8 1 13 7 9 7 10 64 49 11 2 15 47 49 12 2 15 8 68 5 48 6 44 43 7 79 49 8 1 13 7 9 7 10 64 49 11 2 15 49 4 2 19 0 15 20 0 5 48 13 49 14 1 15 20 0 49 15 0 15 5 48 6 49 16 0 49 17 0 7 18 45 0 19 43 20 47 101 21 63 2 83 22 11 I 9 I 1 I 0 I 0 I -2 p 23 x 10 Lumberjack n x 6 Device x 6 Stream x 3 new x 8 allocate x 6 stream x 4 Hash x 16 new_from_literal x 16 additional_lines s 12 // :message x 3 []= x 10 initialize x 5 entry x 5 write x 5 flush x 6 string x 6 should s 74 2011-01-15T14:23:45.123 INFO [app(12345) #ABCD] line 1 // line 2 // line 3 n x 14 LINE_SEPARATOR x 4 to_s x 2 == p 9 I 0 I 4e I 47 I 4f I 50 I 50 I 56 I 51 I 6e x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 1 x 6 device p 9 I 0 I 43 I a I 44 I 14 I 46 I 1f I 4d I 2a x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 0 x 7 context p 27 I 0 I 5 I a I 6 I 14 I 7 I 1e I 8 I 28 I a I 33 I 12 I 3e I 1a I 49 I 21 I 54 I 26 I 5f I 2d I 6a I 34 I 75 I 3b I 80 I 42 I 8b x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 0 x 8 describe p 5 I 0 I 1 I 9 I 3 I 1a x 65 /Users/bdurand/dev/projects/lumberjack/spec/device/stream_spec.rb p 0