!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 18 SizeRollingLogFile M 1 p 2 x 9 for_block t n x 9 __block__ i 75 5 7 0 56 1 47 50 2 1 15 5 7 0 56 3 47 50 4 1 15 5 7 5 64 56 6 47 50 7 1 15 5 7 8 64 56 9 47 50 7 1 15 5 7 10 64 56 11 47 50 7 1 15 5 7 12 64 56 13 47 50 7 1 15 5 7 14 64 56 15 47 50 7 1 11 I 4 I 0 I 0 I 0 I -2 p 16 x 3 all M 1 p 2 x 9 for_block t n x 9 __block__ i 4 5 48 0 11 I 2 I 0 I 0 I 0 I -2 p 1 x 14 create_tmp_dir p 3 I 0 I 6 I 4 x 80 /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb p 0 x 6 before M 1 p 2 x 9 for_block t n x 9 __block__ i 4 5 48 0 11 I 2 I 0 I 0 I 0 I -2 p 1 x 14 delete_tmp_dir p 3 I 0 I a I 4 x 80 /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb p 0 x 5 after s 51 should roll a file when it gets to a specified size M 1 p 2 x 9 for_block t n x 9 __block__ i 258 45 0 1 5 48 2 7 3 5 7 4 47 49 5 1 47 101 6 7 7 63 3 49 8 2 19 0 15 45 9 10 43 11 43 12 13 71 13 47 9 81 47 49 14 0 13 20 0 44 43 15 80 49 16 1 13 7 17 4 40 49 18 2 15 13 7 19 7 20 64 49 18 2 15 47 49 21 2 15 8 112 20 0 44 43 15 80 49 16 1 13 7 17 4 40 49 18 2 15 13 7 19 7 20 64 49 18 2 15 49 13 2 19 1 15 45 9 22 43 23 13 71 13 47 9 155 47 49 14 0 13 20 1 44 43 15 79 49 16 1 13 7 24 80 49 18 2 15 47 49 21 2 15 8 175 20 1 44 43 15 79 49 16 1 13 7 24 80 49 18 2 15 49 13 2 19 2 15 4 4 56 25 50 26 0 15 20 2 49 27 0 15 45 0 28 20 0 47 101 6 7 29 63 2 49 30 1 45 9 31 43 32 49 33 1 49 34 0 7 35 64 7 36 64 7 37 64 35 3 83 38 15 45 0 39 20 0 49 30 1 49 34 0 7 40 45 9 41 43 32 47 101 6 63 2 83 38 11 I b I 3 I 0 I 0 I -2 p 42 x 4 File n x 7 tmp_dir s 1 a I 3b9aca00 x 4 rand x 4 to_s s 4 .log x 4 join x 10 Lumberjack n x 6 Device x 18 SizeRollingLogFile x 3 new x 8 allocate x 4 Hash x 16 new_from_literal x 8 max_size x 3 []= x 8 template s 8 :message x 10 initialize n x 6 Logger x 11 buffer_size M 1 p 2 x 9 for_block t n x 9 __block__ i 30 57 19 0 15 21 1 2 7 0 20 0 79 81 1 47 101 2 63 2 49 3 1 15 21 1 2 49 4 0 11 I 6 I 1 I 1 I 1 n p 5 s 13 test message x 1 + x 4 to_s x 5 error x 5 flush p 7 I 0 I 11 I 4 I 12 I 17 I 13 I 1e x 80 /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb p 1 x 1 i x 5 times x 5 close n s 2 .1 x 4 read n x 14 LINE_SEPARATOR x 5 split x 6 should s 14 test message 1 s 14 test message 2 s 14 test message 3 x 2 == n s 14 test message 4 n p 15 I 0 I e I 1c I f I 73 I 10 I b2 I 11 I ba I 15 I c0 I 17 I e8 I 18 I 102 x 80 /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb p 3 x 8 log_file x 6 device x 6 logger x 2 it s 51 should be able to specify the max size in kilobytes M 1 p 2 x 9 for_block t n x 9 __block__ i 110 45 0 1 5 48 2 7 3 5 7 4 47 49 5 1 47 101 6 7 7 63 3 49 8 2 19 0 15 45 9 10 43 11 43 12 13 71 13 47 9 72 47 49 14 0 13 20 0 44 43 15 79 49 16 1 13 7 17 7 18 64 49 19 2 15 47 49 20 2 15 8 94 20 0 44 43 15 79 49 16 1 13 7 17 7 18 64 49 19 2 15 49 13 2 19 1 15 20 1 49 17 0 49 21 0 7 22 83 23 11 I a I 2 I 0 I 0 I -2 p 24 x 4 File n x 7 tmp_dir s 1 b I 3b9aca00 x 4 rand x 4 to_s s 4 .log x 4 join x 10 Lumberjack n x 6 Device x 18 SizeRollingLogFile x 3 new x 8 allocate x 4 Hash x 16 new_from_literal x 8 max_size s 3 32K x 3 []= x 10 initialize x 6 should I 8000 x 2 == p 7 I 0 I 1c I 1c I 1d I 61 I 1e I 6e x 80 /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb p 2 x 8 log_file x 6 device s 51 should be able to specify the max size in megabytes M 1 p 2 x 9 for_block t n x 9 __block__ i 110 45 0 1 5 48 2 7 3 5 7 4 47 49 5 1 47 101 6 7 7 63 3 49 8 2 19 0 15 45 9 10 43 11 43 12 13 71 13 47 9 72 47 49 14 0 13 20 0 44 43 15 79 49 16 1 13 7 17 7 18 64 49 19 2 15 47 49 20 2 15 8 94 20 0 44 43 15 79 49 16 1 13 7 17 7 18 64 49 19 2 15 49 13 2 19 1 15 20 1 49 17 0 49 21 0 7 22 83 23 11 I a I 2 I 0 I 0 I -2 p 24 x 4 File n x 7 tmp_dir s 1 c I 3b9aca00 x 4 rand x 4 to_s s 4 .log x 4 join x 10 Lumberjack n x 6 Device x 18 SizeRollingLogFile x 3 new x 8 allocate x 4 Hash x 16 new_from_literal x 8 max_size s 4 100M x 3 []= x 10 initialize x 6 should I 6400000 x 2 == p 7 I 0 I 22 I 1c I 23 I 61 I 24 I 6e x 80 /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb p 2 x 8 log_file x 6 device s 51 should be able to specify the max size in gigabytes M 1 p 2 x 9 for_block t n x 9 __block__ i 110 45 0 1 5 48 2 7 3 5 7 4 47 49 5 1 47 101 6 7 7 63 3 49 8 2 19 0 15 45 9 10 43 11 43 12 13 71 13 47 9 72 47 49 14 0 13 20 0 44 43 15 79 49 16 1 13 7 17 7 18 64 49 19 2 15 47 49 20 2 15 8 94 20 0 44 43 15 79 49 16 1 13 7 17 7 18 64 49 19 2 15 49 13 2 19 1 15 20 1 49 17 0 49 21 0 7 22 83 23 11 I a I 2 I 0 I 0 I -2 p 24 x 4 File n x 7 tmp_dir s 1 d I 3b9aca00 x 4 rand x 4 to_s s 4 .log x 4 join x 10 Lumberjack n x 6 Device x 18 SizeRollingLogFile x 3 new x 8 allocate x 4 Hash x 16 new_from_literal x 8 max_size s 2 1G x 3 []= x 10 initialize x 6 should I 40000000 x 2 == p 7 I 0 I 28 I 1c I 29 I 61 I 2a I 6e x 80 /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb p 2 x 8 log_file x 6 device s 54 should figure out the next archive file name available M 1 p 2 x 9 for_block t n x 9 __block__ i 120 45 0 1 5 48 2 7 3 64 49 4 2 19 0 15 44 43 5 4 3 4 11 49 6 2 56 7 50 8 0 15 45 9 10 43 11 43 12 13 71 6 47 9 75 47 49 13 0 13 20 0 44 43 14 79 49 15 1 13 7 16 7 17 64 49 18 2 15 47 49 19 2 15 8 97 20 0 44 43 14 79 49 15 1 13 7 16 7 17 64 49 18 2 15 49 6 2 19 1 15 20 1 49 20 0 49 21 0 20 0 47 101 22 7 23 63 2 83 24 11 I a I 2 I 0 I 0 I -2 p 25 x 4 File n x 7 tmp_dir s 12 filename.log x 4 join x 5 Range x 3 new M 1 p 2 x 9 for_block t n x 9 __block__ i 31 57 19 0 15 45 0 1 21 1 0 47 101 2 7 3 20 0 47 101 2 63 3 7 4 64 56 5 50 6 2 11 I 6 I 1 I 1 I 1 n p 7 x 4 File n x 4 to_s s 1 . s 1 w M 1 p 2 x 9 for_block t n x 9 __block__ i 16 57 19 0 15 20 0 21 1 0 49 0 0 49 1 1 11 I 4 I 1 I 1 I 1 n p 2 x 4 to_s x 5 write p 3 I 0 I 30 I 10 x 80 /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb p 1 x 1 f x 4 open p 5 I 0 I 2f I 4 I 30 I 1f x 80 /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb p 1 x 1 i x 4 each x 10 Lumberjack n x 6 Device x 18 SizeRollingLogFile x 8 allocate x 4 Hash x 16 new_from_literal x 8 max_size s 4 100M x 3 []= x 10 initialize x 17 archive_file_name x 6 should x 4 to_s s 3 .12 x 2 == p 9 I 0 I 2e I f I 2f I 1f I 32 I 64 I 33 I 78 x 80 /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb p 2 x 8 log_file x 6 device p 15 I 0 I 5 I a I 9 I 14 I d I 1f I 1b I 2a I 21 I 35 I 27 I 40 I 2d I 4b x 80 /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb p 0 x 8 describe p 5 I 0 I 1 I 9 I 3 I 1a x 80 /Users/bdurand/dev/projects/lumberjack/spec/device/size_rolling_log_file_spec.rb p 0