<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Meta Bates &#187; logging</title>
	<atom:link href="http://www.metabates.com/tag/logging/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.metabates.com</link>
	<description>The technical ramblings of Mark Bates.</description>
	<lastBuildDate>Sun, 15 Aug 2010 12:49:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Release 0.8.0</title>
		<link>http://www.metabates.com/2008/10/06/release-080/</link>
		<comments>http://www.metabates.com/2008/10/06/release-080/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 16:06:32 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[Updates]]></category>
		<category><![CDATA[assets]]></category>
		<category><![CDATA[cachetastic]]></category>
		<category><![CDATA[configatron]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[mack]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[routes]]></category>
		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://www.mackframework.com/?p=190</guid>
		<description><![CDATA[Here it is the 0.8.0 release of Mack! What a fun and exciting release it is as well. There are a few big changes under the hood, all for the better of course, but there&#8217;s only really one that will cause existing Mack projects some conversion pain. However, we&#8217;ve tried to take the sting out [...]]]></description>
			<content:encoded><![CDATA[<p>Here it is the 0.8.0 release of Mack! What a fun and exciting release it is as well. There are a few big changes under the hood, all for the better of course, but there&#8217;s only really one that will cause existing Mack projects some conversion pain. However, we&#8217;ve tried to take the sting out of that with a helpful rake task.</p>
<h3>Configatron Support</h3>
<p>Mack 0.8.0 replaces the old application_configuration system with the new ultra sexy and cool, <a href="http://www.mackframework.com/2008/10/03/configatron-214-released/">Configatron</a> system. This is a much better way of doing system configurations, and I&#8217;m sure you&#8217;ll agree once you give it a spin. We&#8217;ve tried to take the edge off the conversion of these configuration systems with a helpful little rake task:</p>
<pre>$&nbsp;rake mack:update:configuration</pre>
<p>For most cases, that task should do just fine. There might be a few places you have to tweak, such as in your own code, but once you do that, you&#8217;ll love Configatron!</p>
<p>For more information about using Configatron checkout this page:</p>
<p><a href="http://www.mackery.com/configuration/configatron">http://www.mackery.com/configuration/configatron</a></p>
<h3>A New Router</h3>
<p>That&#8217;s right, the router in Mack has been completely rewritten from the ground up, yet unlike other frameworks, we&#8217;ve managed to keep our external API the same, so you don&#8217;t have to change your routes.rb at all. <img src='http://www.metabates.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  That&#8217;s a bit of good news, isn&#8217;t it?</p>
<p>What do you get with the new router? Well, for one, it should be faster, that&#8217;s always a plus. You can also now do &#8216;wildcard&#8217; parameters in routes, use procs, extended &#8216;resourced&#8217; routes, define &#8216;host&#8217; and &#8216;scheme&#8217; parameters, use regular expressions, and a few other little nifty things. Plus, because of the rewrite, it&#8217;s going to make it easier to extending the routing system to be even more powerful! In a future release, sometime in the 0.8.x series, you&#8217;ll even be able to plugin in your own router just by implementing a few API methods.</p>
<p>For more information about the new router, and what you can do, check out:</p>
<p><a href="http://www.mackery.com/routing/index">http://www.mackery.com/routing/index</a></p>
<h3>Asset Management</h3>
<p>There is now a really great asset management system that easily allows you to build bundles of CSS and JavaScript files to help keep your code neat and easy to use. Bundle that with the new mack-asset_packager gem, and support for asset hosts, you get a simple, easy, and fast way to compress and deliver your assets.&nbsp;</p>
<p>For more information, checkout these helpful pages from the user guide:</p>
<p><a href="http://www.mackery.com/views/asset_mgr">http://www.mackery.com/views/asset_mgr</a><br />
<a href="http://www.mackery.com/views/asset_host">http://www.mackery.com/views/asset_host</a>&nbsp;</p>
<h3>Misc.</h3>
<p>As always, there&#8217;s a bunch of other great stuff just lurking around in this release. A better logger, for a start, more helpers, bug fixes, better error reporting, default 404 and 500 pages, and more. Please download and enjoy the release, I&#8217;m sure you&#8217;ll find worth it. Enjoy!</p>
<p>Changelog:</p>
<ol>
<li>[#187] Fixed: When an exception is raised, the request doesn&#8217;t get &#8216;logged&#8217;</li>
<li>[#185] Fixed: .html is being appended to logged requests when there&#8217;s a 404</li>
<li>[#184] Request logging should also print the message of the status code</li>
<li>[#183] Updates to asset mgr/host</li>
<li>[#181] Content-type can now be set with calling render.</li>
<li>[#179] When configatron.mack.show_exceptions is false you now either the public/404.html or public/500.html file.</li>
<li>[#178] Added a configure parameter to turn off log coloring</li>
<li>[#176] Added a Google Analytics helper.</li>
<li>[#175] Generating urls should use host or scheme if defined</li>
<li>[#171] Ability to extend resources in routes</li>
<li>[#170] Regex support in routes</li>
<li>[#169] Proc support for Routes</li>
<li>[#168] Fixed ERB errors not being reported correctly.</li>
<li>[#167] Rake task to convert app config yamls to configatron</li>
<li>[#165] Asset Packager</li>
<li>[#164] Response helper for &#8216;attachments&#8217;</li>
<li>[#159] Added link_unless_current and link_if helpers</li>
<li>[#156] Added &#8216;Wildcard&#8217; Routes support</li>
<li>[#152] INCOMPATIBILITY NOTICE: Removed deprecated support for delivered_emails use delivered_notifiers instead.</li>
<li>[#138] Added support for &#8216;host&#8217; &amp; &#8216;scheme&#8217; parameters in routes</li>
<li>[#135] Replaced log4r with logging gem.</li>
<li>[#119] Freeze gems</li>
<li>[#106] INCOMPATIBILITY NOTICE: Removed deprecated support for droute_url</li>
<li>[#93] INCOMPATIBILITY NOTICE: Removed deprecated support for &#8216;top&#8217; level ApplicationHelper</li>
<li>[#23] INCOMPATIBILITY NOTICE: Removed support for application_configuration and added support for configatron</li>
<li>gem: logging 0.9.4</li>
<li>gem: thin 1.0.0</li>
<li>gem: rspec 1.1.8</li>
<li>gem: configatron 2.1.4</li>
<li>gem: cachetastic 2.0.0</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2008/10/06/release-080/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Release 0.6.1.1</title>
		<link>http://www.metabates.com/2008/08/04/release-061/</link>
		<comments>http://www.metabates.com/2008/08/04/release-061/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 17:35:26 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[Updates]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[data factory]]></category>
		<category><![CDATA[data mapper]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[mack]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[rjs]]></category>
		<category><![CDATA[ruby-debug]]></category>

		<guid isPermaLink="false">http://www.mackframework.com/?p=117</guid>
		<description><![CDATA[Mack 0.6.1.1 features 38 completed tickets and a whole host of really great features and improvements. Here&#8217;s a quick overview of a few of the big features in Mack 0.6.1.1. Page Caching There is now a mack-caching gem which gives you easy to use page caching when you require it. To use page caching first [...]]]></description>
			<content:encoded><![CDATA[<p>Mack 0.6.1.1 features 38 completed tickets and a whole host of really great features and improvements. Here&#8217;s a quick overview of a few of the big features in Mack 0.6.1.1.</p>
<h3>Page Caching</h3>
<p>There is now a mack-caching gem which gives you easy to use page caching when you require it. To use page caching first you need to add it to your gems.rb file like such:</p>
<pre>gem.add "mack-caching", :libs =&gt; "mack-caching"</pre>
<p>That will require the gem and give your app access to the page caching libraries. Next you to turn on page caching in your application. In the appropriate config/*.yml file add the following:</p>
<pre>use_page_caching: true</pre>
<p>Now, you just need to tell your controllers which actions they should cache:</p>
<pre>class FooController
&nbsp;&nbsp;include Mack::Controller
&nbsp;&nbsp;cache_pages <img src='http://www.metabates.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> nly =&gt; [:index, :show]
end</pre>
<p>If you give the cache_pages no optional parameters then it will cache all the actions for that controller. Alternatively, you could give it an :except parameter to list the actions you don&#8217;t want cached.&nbsp;</p>
<h3>Notifiers (aka Mailers)</h3>
<p>Mack now has a mack-notifier gem that will be the repository for all &#8216;notification&#8217; systems, the first of which is email. The Mack::Notifier API is simple and easy to use and will allow developers to plugin in different notification systems under the cover without having to change their application code.&nbsp;</p>
<p>A notifier can look as simple as:</p>
<pre>class WelcomeEmail
&nbsp;&nbsp;include Mack::Notifier
end</pre>
<p>With that you can then write the following bit of code:</p>
<pre>we = WelcomeEmail.new
we.to = "foo@example.com"
we.from = "bar@example.com"
we.subject = "Hello World"
we.body(:text) = "My plain text body"
we.body(:html) = "My html body"
we.attach(Mack::Notifier::Attachment.new("/path/to/my/file"))&nbsp;
we.deliver</pre>
<p>Obviously there&#8217;s a lot more to the API, including a validations module, but that&#8217;s a subject for another post.&nbsp;</p>
<h3>JavaScript (aka RJS)</h3>
<p>The mack-javascript gem now gives you Rails-like RJS support for Mack. The default library to use with mack-javascript is jQuery, but there is prototype support available as well.&nbsp;</p>
<h3>Data Factory</h3>
<p>Creating faux data for testing can be a real nightmare. Fixtures can be difficult to maintain and trying to create your own faux data can be a chore. That&#8217;s where the mack-data_factory gem comes in.</p>
<p>For each model that you want to produce, you will need to define a factory class. &nbsp;</p>
<p>Let&#8217;s say that I have 2 models: Item and User, and Item belongs to user. &nbsp;So the factories will look like the following:</p>
<pre>class ItemFactory
&nbsp;&nbsp;include Mack::Data::Factory
&nbsp;&nbsp;field :title, "MyItem"
&nbsp;&nbsp;field <img src='http://www.metabates.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> wner_id, {:user =&gt; 'id'}
end

class UserFactory
&nbsp;&nbsp;include Mack::Data::Factory
&nbsp;&nbsp;field :username, "planters", :length =&gt; 25, :content =&gt; :alpha
&nbsp;&nbsp;field :password, "roastedPeanuts", :immutable =&gt; true
end</pre>
<p>So, the 2 classes above defined the factory for item and user. &nbsp;As you can see, each factory will need to explicitly&nbsp;list all the fields that it will populate, and for each field, you can define rules on how the content is generated.</p>
<p>Supported content types:&nbsp;</p>
<ul>
<li>:alpha &#8211;&gt; alphabets. &nbsp;rules: [:length, :min_length, :max_length]</li>
<li>:alphanumeric &#8211;&gt; alphabets and number. &nbsp;rules: same as :alpha</li>
<li>:numeric &#8211;&gt; numbers [optional, because if the field's default value is number, its content type will automatically set to numeric)</li>
<li>:email --&gt; generate random email address</li>
<li>:username --&gt; generate random username</li>
<li>:domain --&gt; generate random domain name</li>
<li>:firstname --&gt; generate first name</li>
<li>:lastname --&gt; generate last name</li>
<li>:name --&gt; generate full name</li>
<li>:city --&gt; generate city name</li>
<li>:streetname --&gt; generate street name</li>
<li>:state --&gt; generate state. &nbsp;rules: [:country --&gt; :us or :uk, :abbr --&gt; true if you want a abbreviated state name (us only)]</li>
<li>:zipcode &#8211;&gt; generate zipcode. rules: [:country --&gt; :us or :uk]</li>
<li>:phone &#8211;&gt; generate phone number</li>
<li>:company &#8211;&gt; generate company name. &nbsp;rules: [:include_bs --&gt; include sales tag line]<br />
example: &nbsp;field, &#8220;&#8221;, :content =&gt; :company, :include_bs =&gt; true&nbsp;could generate something like:<br />
Fadel-Larkin&nbsp;monetize cross-media experiences</li>
</ul>
<div>There&#8217;s a lot more to the mack-data_factory gem, so I highly recommend you check it out.</div>
<p>Changelog:</p>
<ul>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/60-mack-app_generator-is-broken" target="_blank">#60</a>] Fixed Mack executable problem</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/59-the-gems-tasks-aren-t-working-again" target="_blank">#59</a>] Fixed gems:* tasks</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/57-files-should-be-moved-under-lib-mack" target="_blank">#57</a>] Moved most files under to lib/mack</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/56-create-mack-utils-registrymap" target="_blank">#56</a>] mack-more: Added Mack::Utils::RegistryMap</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/55-registrymap-and-registrylist" target="_blank">#55</a>] mack-more: mack-facets: Mack::Utils::Registry is now Mack::Utils::RegistryList</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/54-datamapper-0-9-3-support" target="_blank">#54</a>] Added DataMapper 0.9.3 support</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/52-orm-require-needs-to-use-full-path" target="_blank">#52</a>] mack-more: mack-[orm] should require mack-[orm].rb using its full path.</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/51-orm-setting-is-in-the-wrong-place-in-newly-generated-app" target="_blank">#51</a>] Application generator should generate orm support in the right place</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/50-split-mack-rb-in-2" target="_blank">#50</a>] Mack will now have 2 environment files: mack_core and mack_app. &nbsp;Mack.rb will load both files, but it gives other module chance to load just the core files and not the application&#8217;s files.</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/49-orm-tasks-aren-t-available" target="_blank">#49</a>] Making sure the orm tasks is available when orm_support is removed from the app_config</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/49-orm-tasks-aren-t-available" target="_blank">#49</a>] mack-active_record: &nbsp;mack-active_record.rb will require mack-active_record_tasks.rb</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/49-orm-tasks-aren-t-available" target="_blank">#49</a>] mack-data_mapper: &nbsp;mack-data_mapper.rb will require mack-data_mapper_tasks.rb</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/49-orm-tasks-aren-t-available" target="_blank">#49</a>] Updated warning message if orm is defined in app_config (i.e. user only needs to require mack-[orm_name], instead of both that and mack-[orm_name]_tasks).</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/48-rake-generator-list-displays-wrong-information" target="_blank">#48</a>] rake generator:list now displays the correct names for the generator tasks.</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/47-rake-gems-install-blows-up" target="_blank">#47</a>] rake gems:* tasks now work, and no longer require mack_ruby_core_extensions</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/46-to_param-on-nilclass-should-raise-nomethoderror" target="_blank">#46</a>] Calling .to_param on nil now raises a NoMethodError exception.</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/45-rake-stats-doesn-t-work-with-test-unit-testcase" target="_blank">#45</a>] rake stats task now works with Test::Unit::TestCase</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/44-refactor-mack-runner-to-make-it-easier-to-extend" target="_blank">#44</a>] Mack::Runner has now been extended to allow for greater extension flexibility.</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/43-create-a-registry-base-class" target="_blank">#43</a>] Added a Mack::Utils::Registry class to allow for easy creation of registries.</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/42-applications-should-be-able-to-turn-of-sessions-globally" target="_blank">#42</a>] Sessions can now be turned off globally using the app_config.mack.use_sessions switch.</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/41-deprecate-app_config-orm" target="_blank">#41</a>] Deprecate orm_support.rb</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/38-a-controller-registry-is-needed" target="_blank">#38</a>] There is now a registry of Controllers that are in the system.</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/36-controller-s-don-t-have-control-over-there-initialize-methods" target="_blank">#36</a>] Renamed the initialize method in the Mack::Controller module to configure_controller. This gives</li>
<li>&nbsp;&nbsp;control of the initialize method back to the class.</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/34-mack-l10n-raised-exception-should-have-fully-qualified-name" target="_blank">#34</a>] Mack::l10n now raises exception with a fully qualified name.</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/33-mack-0-6-0-activerecord-dependency" target="_blank">#33</a>] mack-active_record now requires ActiveRecord 2.0.2 explicitly, not &gt;=2.0.2</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/31-support-for-ruby-debug" target="_blank">#31</a>] Added support for ruby-debug.</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/26-log-coloring-in-console" target="_blank">#26</a>] Log Coloring for console output.</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/24-mailer-support" target="_blank">#24</a>] Added mack-notifier support.</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/18-page-caching" target="_blank">#18</a>] Added Page caching.</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/14-fixtures-like-thing" target="_blank">#14</a>] Data Factory</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/7-hookable">#7</a>] Added support for Extlib::Hook in a few places.</li>
<li>[<a href="http://mack.lighthouseapp.com/projects/11385/tickets/6-rjs" target="_blank">#6</a>] RJS support</li>
<li>Added a rake tmp:clear task.</li>
<li>gem: application_configuration 1.5.1</li>
<li>gem: ruby-debug 0.10.0</li>
<li>gem: data_mapper 0.9.3</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2008/08/04/release-061/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.329 seconds -->
