<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -23,11 +23,11 @@ module Merb
         if @cluster
           @port.to_i.upto(@port.to_i + @cluster.to_i-1) do |port|
             pidfile = pid_file(port)
-            pid = IO.read(pidfile).chomp.to_i
+            pid = IO.read(pidfile).chomp.to_i if File.exist?(pidfile)
 
             unless alive?(port)
               remove_pid_file(port)
-              puts &quot;Starting merb server on port #{port}, pid file: #{pidfile} and process id is #{pid}&quot;
+              puts &quot;Starting merb server on port #{port}, pid file: #{pidfile} and process id is #{pid}&quot; if Merb::Config[:verbose]
               daemonize(port)
             else
               raise &quot;Merb is already running: port is #{port}, pid file: #{pidfile}, process id is #{pid}&quot;
@@ -35,12 +35,11 @@ module Merb
           end
         elsif Merb::Config[:daemonize]
           pidfile = pid_file(port)
-          pid = IO.read(pidfile).chomp.to_i
+          pid = IO.read(pidfile).chomp.to_i if File.exist?(pidfile)
 
           unless alive?(@port)
-            puts &quot;Removing pid file #{pidfile}, port is #{port}...&quot;
             remove_pid_file(@port)
-            puts &quot;Daemonizing...&quot;
+            puts &quot;Daemonizing...&quot; if Merb::Config[:verbose]
             daemonize(@port)
           else
             raise &quot;Merb is already running: port is #{port}, pid file: #{pidfile}, process id is #{pid}&quot;
@@ -48,9 +47,9 @@ module Merb
         else
           trap('TERM') { exit }
           trap('INT') { puts &quot;\nExiting&quot;; exit }
-          puts &quot;Running bootloaders...&quot;
+          puts &quot;Running bootloaders...&quot; if Merb::Config[:verbose]
           BootLoader.run
-          puts &quot;Starting Rack adapter...&quot;
+          puts &quot;Starting Rack adapter...&quot; if Merb::Config[:verbose]
           Merb.adapter.start(Merb::Config.to_hash)
         end
       end
@@ -62,11 +61,11 @@ module Merb
       # Boolean::
       #   True if Merb is running on the specified port.
       def alive?(port)
-        puts &quot;About to check if port #{port} is alive...&quot;
+        puts &quot;About to check if port #{port} is alive...&quot; if Merb::Config[:verbose]
         pidfile = pid_file(port)
-        puts &quot;Pidfile is #{pidfile}...&quot;
+        puts &quot;Pidfile is #{pidfile}...&quot; if Merb::Config[:verbose]
         pid = IO.read(pidfile).chomp.to_i
-        puts &quot;Process id is #{pid}&quot;
+        puts &quot;Process id is #{pid}&quot; if Merb::Config[:verbose]
         Process.kill(0, pid)
         true
       rescue
@@ -111,7 +110,7 @@ module Merb
       # ==== Parameters
       # port&lt;~to_s&gt;:: The port of the Merb process to daemonize.
       def daemonize(port)
-        puts &quot;About to fork...&quot;
+        puts &quot;About to fork...&quot; if Merb::Config[:verbose]
         fork do
           Process.setsid
           exit if fork
@@ -131,10 +130,10 @@ module Merb
       def change_privilege
         if Merb::Config[:user]
           if Merb::Config[:group]
-            puts &quot;About to change privilege to group #{Merb::Config[:group]} and user #{Merb::Config[:user]}&quot;
+            puts &quot;About to change privilege to group #{Merb::Config[:group]} and user #{Merb::Config[:user]}&quot; if Merb::Config[:verbose]
             _change_privilege(Merb::Config[:user], Merb::Config[:group])
           else
-            puts &quot;About to change privilege to user #{Merb::Config[:user]}&quot;
+            puts &quot;About to change privilege to user #{Merb::Config[:user]}&quot; if Merb::Config[:verbose]
             _change_privilege(Merb::Config[:user])
           end
         end
@@ -153,7 +152,7 @@ module Merb
       # instead of the port based PID file.
       def remove_pid_file(port)
         pidfile = pid_file(port)
-        puts &quot;Removing pid file #{pidfile} (port is #{port})&quot;
+        puts &quot;Removing pid file #{pidfile} (port is #{port})...&quot;
         FileUtils.rm(pidfile) if File.exist?(pidfile)
       end
 
@@ -170,8 +169,9 @@ module Merb
       # instead of the port based PID file.
       def store_pid(port)
         pidfile = pid_file(port)
-        puts &quot;pid file stored at #{pidfile}&quot;
+        puts &quot;Storing pid file to #{pidfile}...&quot;
         FileUtils.mkdir_p(File.dirname(pidfile)) unless File.directory?(File.dirname(pidfile))
+        puts &quot;Created directory, writing process id...&quot; if Merb::Config[:verbose]
         File.open(pidfile, 'w'){ |f| f.write(&quot;#{Process.pid}&quot;) }
       end
 </diff>
      <filename>lib/merb-core/server.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>304e19d16f0d12e9fc69c1435904342555b1382d</id>
    </parent>
  </parents>
  <author>
    <name>Michael S. Klishin</name>
    <email>michael@novemberain.com</email>
  </author>
  <url>http://github.com/wycats/merb-core/commit/ad8626f87845b193568ec40bb01cad443996343d</url>
  <id>ad8626f87845b193568ec40bb01cad443996343d</id>
  <committed-date>2008-05-12T07:06:48-07:00</committed-date>
  <authored-date>2008-05-12T07:06:48-07:00</authored-date>
  <message>Add extra output lines to Merb::Server methods if verbose mode is on.</message>
  <tree>5d96e2d6d08cd6e4223cd86c512148c8aee7b828</tree>
  <committer>
    <name>Michael S. Klishin</name>
    <email>michael@novemberain.com</email>
  </committer>
</commit>
