summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2012-07-21 15:30:09 +0100
committerPat Thoyts <patthoyts@users.sourceforge.net>2012-07-21 15:32:04 +0100
commit6035ad7e1fe519d0c6a42731790183889e3ba31d (patch)
treee32e23bd58193036c7af392c8c9738a640d040c7
parent8b7e404b5b6944e9c92cc270b2e5d0005781d49d (diff)
downloadgitlab-ce-6035ad7e1fe519d0c6a42731790183889e3ba31d.tar.gz
Create the githost.log file if necessary.
This resolves issue #1121. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
-rw-r--r--lib/gitlab/logger.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gitlab/logger.rb b/lib/gitlab/logger.rb
index aff13baf67b..c3a19e71c10 100644
--- a/lib/gitlab/logger.rb
+++ b/lib/gitlab/logger.rb
@@ -10,6 +10,7 @@ module Gitlab
def self.read_latest
path = Rails.root.join("log/githost.log")
+ self.build unless File.exist?(path)
logs = File.read(path).split("\n")
end