Add logfile option

This commit is contained in:
Dzmitry Plashchynski
2015-03-03 19:01:33 +02:00
parent 9675fc3517
commit 0ead66f626
4 changed files with 16 additions and 2 deletions

View File

@@ -42,9 +42,13 @@ module Crono
OptionParser.new do |opts|
opts.banner = "Usage: crono [options]"
opts.on("-c", "--cronotab cronotab.rb", "Cronotab file (Default: #{Crono.config.cronotab})") do |cronotab|
opts.on("-C", "--cronotab PATH", "Path to cronotab file (Default: #{Crono.config.cronotab})") do |cronotab|
Crono.config.cronotab = cronotab
end
opts.on("-L", "--logfile PATH", "Path to writable logfile (Default: #{Crono.config.logfile})") do |logfile|
Crono.config.logfile = logfile
end
end.parse!(argv)
end
end