<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/webby/journal.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,8 +1,9 @@
 == 0.9.3 / 2008-10-
 
-* 1 minor enhancement
+* 2 minor enhancements
   - Added a &quot;wikiwords&quot; filter to process [[text]] as links to other pages
     (thanks to Paul)
+  - Added colorization to the output text (facets gem required)
 * 1 bug fix
   - Fixed a bug on Windows where line endings were messing with meta-data
 </diff>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <diff>@@ -134,6 +134,7 @@ lib/webby/helpers/tag_helper.rb
 lib/webby/helpers/tex_img_helper.rb
 lib/webby/helpers/ultraviolet_helper.rb
 lib/webby/helpers/url_helper.rb
+lib/webby/journal.rb
 lib/webby/link_validator.rb
 lib/webby/renderer.rb
 lib/webby/resources.rb</diff>
      <filename>Manifest.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,38 @@
 #!/usr/bin/env ruby
 
+require 'rubygems'
+require 'logging'
+
+::Logging.configure {
+  logger('Webby') {
+    level      :info
+    appenders  'stdout'
+  }
+
+  logger('Webby::Journal') {
+    level      :info
+    additive   false
+    appenders  'journal'
+  }
+
+  appender('stdout') {
+    type   'Stdout'
+    layout {
+      type          'Pattern'
+      pattern       &quot;[%d] %5l: %m\n&quot;
+      date_pattern  &quot;%H:%M:%S&quot;
+    }
+  }
+
+  appender('journal') {
+    type  'Stdout'
+    layout {
+      type     'Pattern'
+      pattern  &quot;%m\n&quot;
+    }
+  }
+}
+
 require File.expand_path(
     File.join(File.dirname(__FILE__), %w[.. lib webby]))
 </diff>
      <filename>bin/webby</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,38 @@
 #!/usr/bin/env ruby
 
+require 'rubygems'
+require 'logging'
+
+::Logging.configure {
+  logger('Webby') {
+    level      :info
+    appenders  'stdout'
+  }
+
+  logger('Webby::Journal') {
+    level      :info
+    additive   false
+    appenders  'journal'
+  }
+
+  appender('stdout') {
+    type   'Stdout'
+    layout {
+      type          'Pattern'
+      pattern       &quot;[%d] %5l: %m\n&quot;
+      date_pattern  &quot;%H:%M:%S&quot;
+    }
+  }
+
+  appender('journal') {
+    type  'Stdout'
+    layout {
+      type     'Pattern'
+      pattern  &quot;%m\n&quot;
+    }
+  }
+}
+
 require File.expand_path(
     File.join(File.dirname(__FILE__), %w[.. lib webby]))
 </diff>
      <filename>bin/webby-gen</filename>
    </modified>
    <modified>
      <diff>@@ -7,14 +7,6 @@ require 'logging'
 require 'ostruct'
 require 'date'
 
-# Configure Webby to log to STDOUT at the 'info' level
-Logging::Logger['Webby'].level = :info
-Logging::Logger['Webby'].add_appenders(Logging::Appender.stdout)
-Logging::Appender.stdout.layout = Logging::Layouts::Pattern.new(
-    :pattern      =&gt; &quot;[%d] %5l: %m\n&quot;,    # [date] LEVEL: message
-    :date_pattern =&gt; &quot;%H:%M:%S&quot;           # date == HH:MM:SS
-)
-
 module Webby
 
   # :stopdoc:</diff>
      <filename>lib/webby.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 require 'fileutils'
 require 'optparse'
+require 'forwardable'
 
 module Webby::Apps
 
@@ -9,6 +10,7 @@ module Webby::Apps
 #
 
 class Generator
+  extend Forwardable
 
   # Create a new Generator instance and run the +webby+ application given the
   # command line _args_.
@@ -22,10 +24,34 @@ class Generator
 
   # Initialize a new generator object.
   #
-  def initialize
+  def initialize( output = $stdout, input = $stdin )
     @options = {}
     @site = @template = nil
-    @stdout, @stdin = $stdout, $stdin
+    @output, @input = output, input
+    @journal = journal
+  end
+
+  def_delegators :@journal,
+                 :exists, :create, :force, :skip, :identical
+
+  # Writes the given objects to the output destination. Each object is
+  # followed by a newline unless the object is a string with a newline
+  # already at the end.
+  #
+  def puts( *args )
+    @output.puts(*args)
+  end
+
+  # Writes the given objects to the output destination.
+  #
+  def print( *args )
+    @output.print(*args)
+  end
+
+  # Reads a line text frim the input source.
+  #
+  def gets
+    @input.gets
   end
 
   # Run the generator executing the commands specified by the user on the
@@ -60,18 +86,18 @@ class Generator
     opts.on('-t', '--templates', 'list available templates') {
       ary = templates.map {|t| ::File.basename(t)}
       ary.delete 'webby'
-      @stdout.puts &quot;\nAvailable Templates&quot;
-      @stdout.puts &quot;    #{ary.join(', ')}&quot;
-      @stdout.puts
+      puts &quot;\nAvailable Templates&quot;
+      puts &quot;    #{ary.join(', ')}&quot;
+      puts
       exit
     }
 
     opts.separator ''
     opts.separator 'common options:'
 
-    opts.on( '-h', '--help', 'show this message' ) {@stdout.puts opts; exit}
+    opts.on( '-h', '--help', 'show this message' ) {puts opts; exit}
     opts.on( '--version', 'show version' ) do
-      @stdout.puts &quot;Webby #{::Webby::VERSION}&quot;
+      puts &quot;Webby #{::Webby::VERSION}&quot;
       exit
     end
 
@@ -87,13 +113,13 @@ class Generator
 
     # exit if comand line args are missing
     if site.nil? or tmpl.nil?
-      @stdout.puts opts
+      puts opts
       exit 1
     end
 
     templates.each {|t| self.template = t if t =~ %r/\/#{tmpl}$/}
     if template.nil?
-      @stdout.puts opts
+      puts opts
       abort &quot;Could not find template '#{tmpl}'&quot;
     end
 
@@ -205,25 +231,13 @@ class Generator
     end
   end
 
-  %w[exists create force skip identical].each do |m|
-    class_eval &quot;def #{m}( msg ) message('#{m}', msg); end&quot;
-  end
-
-  # Print the given message and message type to stdout.
-  #
-  def message( type, msg )
-    msg = msg.sub(%r/#{site}\/?/, '')
-    return if msg.empty?
-    @stdout.puts &quot;%13s  %s&quot; % [type, msg]
-  end
-
   # Prints an abort message to the screen and then exits the Ruby
   # interpreter. A non-zero return code is used to indicate an error.
   #
   def abort( msg )
-    @stdout.puts &quot;\nAborting!&quot;
-    @stdout.puts &quot;    #{msg}&quot;
-    @stdout.puts
+    puts &quot;\nAborting!&quot;
+    puts &quot;    #{msg}&quot;
+    puts
     exit 1
   end
 
@@ -265,9 +279,8 @@ class Generator
   #
   def force_file_collision?( dst )
     dst = dst.sub(%r/#{site}\/?/, '')
-    @stdout.print &quot;overwrite #{dst}? [(Y)es (n)o (q)uit] &quot;
-    @stdout.flush
-    case @stdin.gets
+    print &quot;overwrite #{dst}? [(Y)es (n)o (q)uit] &quot;
+    case gets
       when %r/q/i  then abort 'user asked to quit'
       when %r/n/i  then :skip
       when %r/y/i  then :force</diff>
      <filename>lib/webby/apps/generator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,13 +21,15 @@ class AutoBuilder
     self.new.run
   end
 
+  attr_reader :logger
+
   # call-seq:
   #    AutoBuilder.new
   #
   # Create a new AutoBuilder class.
   #
   def initialize
-    @log = Logging::Logger[self]
+    @logger = Logging::Logger[self]
 
     @builder = Builder.new
     @builder.load_files
@@ -53,15 +55,16 @@ class AutoBuilder
     return if ary.empty?
 
     ary.each do |evt|
-      @log.debug &quot;changed #{evt.path}&quot;
+      logger.debug &quot;changed #{evt.path}&quot;
       next unless test ?f, evt.path
       next if evt.path =~ ::Webby.exclude
       Resources.new evt.path
     end
 
-    @builder.run :load_files =&gt; false
+    logger.info 'running the build'
+    @builder.run :load_files =&gt; false, :verbose =&gt; false
   rescue =&gt; err
-    @log.error err
+    logger.error err
   end
 
   # call-seq:
@@ -71,7 +74,7 @@ class AutoBuilder
   # Ctrl-C to stop the watcher thread.
   #
   def run
-    @log.info 'starting autobuild (Ctrl-C to stop)'
+    logger.info 'starting autobuild (Ctrl-C to stop)'
 
     Signal.trap('INT') {@watcher.stop}
 </diff>
      <filename>lib/webby/auto_builder.rb</filename>
    </modified>
    <modified>
      <diff>@@ -82,7 +82,6 @@ class Builder
       [args.page, args.title, args.dir]
     end
 
-
     private
 
     # Returns the binding in the scope of the Builder class object.
@@ -98,7 +97,7 @@ class Builder
   # layout directories.
   #
   def initialize
-    @log = Logging::Logger[self]
+    @logger = Logging::Logger[self]
   end
 
   # call-seq:
@@ -125,24 +124,25 @@ class Builder
   #
   def run( opts = {} )
     opts[:load_files] = true unless opts.has_key?(:load_files)
+    verbose = opts.getopt(:verbose, true)
 
     unless test(?d, output_dir)
-      @log.info &quot;creating #{output_dir}&quot;
+      journal.create output_dir
       FileUtils.mkdir output_dir
     end
 
     load_files if opts[:load_files]
 
     Resources.pages.each do |page|
-      next unless page.dirty? or opts[:rebuild]
-
-      @log.info &quot;creating #{page.destination}&quot;
-
-      # make sure the directory exists
-      FileUtils.mkdir_p ::File.dirname(page.destination)
+      unless page.dirty? or opts[:rebuild]
+        journal.identical(page.destination) if verbose
+        next
+      end
 
       # copy the resource to the output directory if it is static
       if page.instance_of? Resources::Static
+        FileUtils.mkdir_p ::File.dirname(page.destination)
+        journal.create_or_update(page)
         FileUtils.cp page.path, page.destination
         FileUtils.chmod 0644, page.destination
 </diff>
      <filename>lib/webby/builder.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,6 +16,11 @@ module Kernel
     STDERR.reopen io.last
     $stdout, $stderr = STDOUT, STDERR
   end
+
+  def journal
+    @journal ||= ::Webby::Journal.new
+  end
+
 end  # module Kernel
 
 # EOF</diff>
      <filename>lib/webby/core_ext/kernel.rb</filename>
    </modified>
    <modified>
      <diff>@@ -36,6 +36,9 @@ class Renderer
     renderer = self.new(page)
 
     loop {
+      FileUtils.mkdir_p ::File.dirname(page.destination)
+      journal.create_or_update(page)
+
       ::File.open(page.destination, 'w') do |fd|
         fd.write(renderer._layout_page)
       end
@@ -43,6 +46,8 @@ class Renderer
     }
   end
 
+  attr_reader :logger
+
   # call-seq:
   #    Renderer.new( page )
   #
@@ -64,7 +69,7 @@ class Renderer
 
     @_bindings = []
     @_content_for = {}
-    @log = Logging::Logger[self]
+    @logger = Logging::Logger[self]
   end
 
   # call-seq:
@@ -227,11 +232,11 @@ class Renderer
 
     @content
   rescue ::Webby::Error =&gt; err
-    @log.error &quot;while rendering page '#{@page.path}'&quot;
-    @log.error err.message
+    logger.error &quot;while rendering page '#{@page.path}'&quot;
+    logger.error err.message
   rescue =&gt; err
-    @log.error &quot;while rendering page '#{@page.path}'&quot;
-    @log.fatal err
+    logger.error &quot;while rendering page '#{@page.path}'&quot;
+    logger.fatal err
     exit 1
   ensure
     @content = nil</diff>
      <filename>lib/webby/renderer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,12 +2,13 @@
 unless WINDOWS
 
 task :growl do
-  Logging::Logger['Webby'].add_appenders(Logging::Appenders::Growl.new(
-    &quot;Webby&quot;,
+  growl = Logging::Appenders::Growl.new('growl',
     :layout =&gt; Logging::Layouts::Pattern.new(:pattern =&gt; &quot;%5l - Webby\000%m&quot;),
     :coalesce =&gt; true,
     :separator =&gt; &quot;\000&quot;
-  ))
+  )
+  Logging::Logger['Webby'].add_appenders(growl)
+  Logging::Logger['Webby::Journal'].add_appenders(growl)
 end
 
 end  # unless WINDOWS</diff>
      <filename>lib/webby/tasks/growl.rake</filename>
    </modified>
    <modified>
      <diff>@@ -55,8 +55,9 @@ describe Webby::Apps::Generator do
 
     before :each do
       @strio = StringIO.new
-      @generator = Webby::Apps::Generator.new
-      @generator.instance_variable_set(:@stdout, @strio)
+      ::Logging::Logger['Webby::Journal'].appenders =
+          ::Logging::Appenders::IO.new('test', @strio)
+      @generator = Webby::Apps::Generator.new(@strio)
 
       class &lt;&lt; @strio
         def to_s</diff>
      <filename>spec/webby/apps/generator_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,3 @@
-# $Id$
 
 require 'find'
 
@@ -15,9 +14,9 @@ namespace :manifest do
       lines.map! do |line|
         case line
         when %r/^(-{3}|\+{3})/; nil
-        when %r/^@/; Console::ANSICode.blue line
-        when %r/^\+/; Console::ANSICode.green line
-        when %r/^\-/; Console::ANSICode.red line
+        when %r/^@/; ANSICode.blue line
+        when %r/^\+/; ANSICode.green line
+        when %r/^\-/; ANSICode.red line
         else line end
       end
     end</diff>
      <filename>tasks/manifest.rake</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3a72af025e80a079fc58e13997dab2e0dc1e2149</id>
    </parent>
  </parents>
  <author>
    <name>Tim Pease</name>
    <email>tim.pease@gmail.com</email>
  </author>
  <url>http://github.com/TwP/webby/commit/cdb8e98d5c037ffdc1e7679ae231df59495de93c</url>
  <id>cdb8e98d5c037ffdc1e7679ae231df59495de93c</id>
  <committed-date>2008-10-04T21:48:11-07:00</committed-date>
  <authored-date>2008-10-04T21:48:11-07:00</authored-date>
  <message>Added colorization to the webby output and simplified the output messages. When building a site, the standard logging goobers no longer appear. The action being taken for the file is colorized if the &quot;facets&quot; gem is installed.</message>
  <tree>052d380aad0e01027bd4f684a15baa467187960d</tree>
  <committer>
    <name>Tim Pease</name>
    <email>tim.pease@gmail.com</email>
  </committer>
</commit>
