diff options
Diffstat (limited to 'railties/lib/rails/tasks/log.rake')
-rw-r--r-- | railties/lib/rails/tasks/log.rake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/railties/lib/rails/tasks/log.rake b/railties/lib/rails/tasks/log.rake new file mode 100644 index 0000000000..6e1334692e --- /dev/null +++ b/railties/lib/rails/tasks/log.rake @@ -0,0 +1,9 @@ +namespace :log do + desc "Truncates all *.log files in log/ to zero bytes" + task :clear do + FileList["log/*.log"].each do |log_file| + f = File.open(log_file, "w") + f.close + end + end +end |