Skip to content

Commit 24bcea9

Browse files
author
nahi
committed
Clean up.
1 parent 2ad8d39 commit 24bcea9

File tree

5 files changed

+4
-33
lines changed

5 files changed

+4
-33
lines changed

sample/app.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
#!/usr/bin/env ruby
22

3-
$:.unshift(File.join('..', 'lib'))
43
require 'logger'
54

65
class MyApp < Logger::Application
76
def initialize(a, b, c)
87
super('MyApp')
98

109
# Set logDevice here.
11-
logfile = File.join('logs', 'app.log')
10+
logfile = 'app.log'
1211
self.log = logfile
1312
self.level = INFO
1413

@@ -43,5 +42,5 @@ def foo(var)
4342

4443
if status != 0
4544
puts 'Some error(s) occured.'
46-
puts 'See "app.log" in "logs" directory.'
45+
puts 'See "app.log".'
4746
end

sample/log.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env ruby
22

3-
$:.unshift(File.join('..', 'lib'))
43
require 'logger'
54

65
log = Logger.new(STDERR)

sample/logToFile.rb

Lines changed: 0 additions & 26 deletions
This file was deleted.

sample/logs/.keep_me

Whitespace-only changes.

sample/logShifting.rb renamed to sample/shifting.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#!/usr/bin/env ruby
22

3-
$:.unshift(File.join('..', 'lib'))
43
require 'logger'
54

6-
logfile = File.join('logs', 'logShifting.log')
5+
logfile = 'shifting.log'
76
# Max 3 age ... logShifting.log, logShifting.log.0, and logShifting.log.1
87
shift_age = 3
98
# Shift log file about for each 1024 bytes.
@@ -24,4 +23,4 @@ def do_log(log)
2423
do_log(log)
2524
end
2625

27-
puts 'See logShifting.* in "logs" directory.'
26+
puts 'See shifting.log and shifting.log.[01].'

0 commit comments

Comments
 (0)