Skip to content

Commit

Permalink
Fixing the logging bug I introduced with my refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
JEG2 committed May 14, 2008
1 parent 3c079f0 commit 4d7410d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
@@ -1,3 +1,8 @@
== 2.0.2

* Fixed the logging bug I introduced by moving the PID check into the Command
class

== 2.0.1

* Added some safety code to ensure SystemExit exceptions are not caught in our
Expand Down
2 changes: 1 addition & 1 deletion lib/scout.rb
Expand Up @@ -5,5 +5,5 @@
require "scout/server"

module Scout
VERSION = "2.0.1".freeze
VERSION = "2.0.2".freeze
end
6 changes: 3 additions & 3 deletions lib/scout/command.rb
Expand Up @@ -185,7 +185,7 @@ def create_pid_file_or_exit
begin
File.unlink(pid_file)
rescue
log.error "Unable to unlink pid file: #{$!.message}"
log.error "Unable to unlink pid file: #{$!.message}" if log
end
end
rescue
Expand All @@ -199,10 +199,10 @@ def create_pid_file_or_exit
# do nothing, we didn't have permission to check the running process
end
if running
log.warn "Process #{pid} was already running"
log.warn "Process #{pid} was already running" if log
exit
else
log.info "Stale PID file found. Clearing it and reloading..."
log.info "Stale PID file found. Clearing it and reloading..." if log
File.unlink(pid_file) rescue nil
retry
end
Expand Down

0 comments on commit 4d7410d

Please sign in to comment.