<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -120,7 +120,7 @@ module Cabar
       else
         if opts[:write]
           unless opts[:prefix] == false
-            @output.write &quot;  #{level.to_s.upcase}: &quot;
+            @output.write &quot;  #{'%8s' % level.to_s.upcase}: &quot;
           end
           msg.each do | msg |
             @output.write msg.to_s
@@ -129,7 +129,7 @@ module Cabar
         else
           msg.each do | msg |
             unless opts[:prefix] == false
-              @output.write &quot;  #{level.to_s.upcase}: &quot;
+              @output.write &quot;  #{'%8s' % level.to_s.upcase}: &quot;
             end
             @output.puts msg.to_s
           end</diff>
      <filename>comp/cabar_core/lib/ruby/cabar/logger.rb</filename>
    </modified>
    <modified>
      <diff>@@ -119,7 +119,7 @@ module Cabar
       # While there are still component paths to search.
       @component_search_path_pending.cabar_each! do | path |
         _logger.debug do
-          &quot;search path #{path.inspect}&quot;
+          &quot;  search path #{path.inspect}&quot;
         end
         @component_search_path &lt;&lt; path
         
@@ -131,7 +131,7 @@ module Cabar
         @component_directories_pending.cabar_each! do | dir |
           @component_directories &lt;&lt; dir
           _logger.debug do
-            &quot;component dir #{dir.inspect}&quot;
+            &quot;  component dir #{dir.inspect}&quot;
           end
 
           parse_component! dir
@@ -193,7 +193,7 @@ module Cabar
       x = x.cabar_uniq_return!
 
       _logger.debug do
-        &quot;result #{x.inspect}&quot;
+        &quot;search_for_component_directories #{path.inspect} =&gt; #{x.inspect}&quot;
       end
 
       x
@@ -230,7 +230,6 @@ module Cabar
     def create_component opts
       opts[:_loader] = self
       c = Component.factory.new opts
-      # c.resolver = self.resolver # YUCK! components know about Resolvers.
       c
     end
 
@@ -291,8 +290,24 @@ private
         comps = { name =&gt; comps }
       end
       
-      # Handle plugins.
-      # Use component name as the default Plugin name.
+
+      # Load plugins.
+      load_component_plugins! name, conf, directory
+
+
+      _logger.info do
+        &quot;    loading #{conf_file.inspect}: DONE&quot;
+      end
+
+      [ conf, comps, conf_file ]
+    end
+
+    
+    # Loads a component's plugins.
+    # Use component name as the default Plugin name.
+    def load_component_plugins! name, conf, directory
+
+      # Install plugins.
       if plugin = conf['plugin']
         begin
           plugin = [ plugin ] unless Array === plugin
@@ -322,12 +337,6 @@ private
           main.plugin_manager.delete_observer(self, :plugin_installed)
         end
       end
-
-      _logger.info do
-        &quot;    loading #{conf_file.inspect}: DONE&quot;
-      end
-
-      [ conf, comps, conf_file ]
     end
 
 </diff>
      <filename>lib/ruby/cabar/loader.rb</filename>
    </modified>
    <modified>
      <diff>@@ -65,7 +65,10 @@ module Cabar
       super
 
       @file = $1 if /^(.*):\d+:in / === @file
+
       @name ||= @@default_name
+      raise ArgumentError, &quot;Component in #{@file} does not have a name&quot; unless @name
+
       @component ||= @@default_component
 
       @block = blk
@@ -150,7 +153,7 @@ module Cabar
 
       def register_plugin! plugin
         # Overlay configuration options.
-        config_opts = main.resolver.configuration.config['plugin']
+        config_opts = main.configuration.config['plugin']
         config_opts &amp;&amp;= config_opts[plugin.name]
 
         _logger.debug { &quot;plugin: #{plugin} configuration #{config_opts.inspect}&quot; }
@@ -163,13 +166,17 @@ module Cabar
         end
 
         # Do not register if disabled.
-        return unless plugin.enabled?
+        unless plugin.enabled?
+          _logger.debug { &quot;plugin: #{plugin} named #{name} disabled&quot; }
+          return
+        end
 
         name = plugin.name.to_s
 
         # Unfortunately we need to allow multiple plugins to be
         # loaded but not registered.
         if @plugin_by_name[name]
+          _logger.debug { &quot;plugin: #{plugin} named #{name} already exists&quot; }
           return
         end
 
@@ -182,6 +189,8 @@ module Cabar
 
         notify_observers(:plugin_installed, plugin)
         
+        _logger.info { &quot;plugin: #{plugin} installed #{opts.inspect}&quot; }
+
         self
       end
     end</diff>
      <filename>lib/ruby/cabar/plugin.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1faccc4ca30e62059717d3afe9bb3acc29c82bb8</id>
    </parent>
  </parents>
  <author>
    <name>Kurt Stephens</name>
    <login>kstephens</login>
    <email>ks.github@kurtstephens.com</email>
  </author>
  <url>http://github.com/kstephens/cabar/commit/b7067d25fb8f7b84d9993ff05d689cf16187bcb4</url>
  <id>b7067d25fb8f7b84d9993ff05d689cf16187bcb4</id>
  <committed-date>2009-06-28T22:52:28-07:00</committed-date>
  <authored-date>2009-06-28T22:52:28-07:00</authored-date>
  <message>Separate plugin loading from component loading.</message>
  <tree>e850c9768b45912c65cd80d4e08bc7956eb5d534</tree>
  <committer>
    <name>Kurt Stephens</name>
    <login>kstephens</login>
    <email>ks.github@kurtstephens.com</email>
  </committer>
</commit>
