<?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>WEBPIRATEN &#187; bash</title>
	<atom:link href="http://webpiraten.de/index.php/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://webpiraten.de</link>
	<description>TECHNOLOGIE-BLOG</description>
	<lastBuildDate>Sun, 20 Jun 2010 19:00:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Agavi Custom Logger implementieren</title>
		<link>http://webpiraten.de/index.php/2010/05/agavi-custom-logger-implementieren/</link>
		<comments>http://webpiraten.de/index.php/2010/05/agavi-custom-logger-implementieren/#comments</comments>
		<pubDate>Fri, 07 May 2010 15:15:57 +0000</pubDate>
		<dc:creator>sägefisch</dc:creator>
				<category><![CDATA[Agavi]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[agavi]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[logger]]></category>
		<category><![CDATA[logging]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=252</guid>
		<description><![CDATA[Um in Agavi custom logfiles zu erstellen, benötigt man einen eigens erstellten logger + appender in der app/config/logger.xml. &#60;!-- logs only custom messages in a custom log --&#62; &#60;logger name=&#34;custom&#34; class=&#34;AgaviLogger&#34; level=&#34;'custom'&#34;&#62; &#60;appenders&#62; &#60;appender&#62;CustomLogAppender&#60;/appender&#62; &#60;/appenders&#62; &#60;/logger&#62; &#60;appender name=&#34;CustomLogAppender&#34; class=&#34;AgaviFileLoggerAppender&#34; layout=&#34;DateTimeLayout&#34;&#62; &#60;ae:parameters&#62; &#60;ae:parameter name=&#34;file&#34;&#62;%core.app_dir%/log/custom.log&#60;/ae:parameter&#62; &#60;/ae:parameters&#62; &#60;/appender&#62; Dann kann man den Logger quasi überall wo der LoggerManager [...]]]></description>
			<content:encoded><![CDATA[<p>Um in Agavi custom logfiles zu erstellen, benötigt man einen eigens erstellten logger + appender in der <strong>app/config/logger.xml</strong>.</p>
<pre class="brush: xml;">
&lt;!-- logs only custom messages in a custom log --&gt;
&lt;logger name=&quot;custom&quot; class=&quot;AgaviLogger&quot; level=&quot;'custom'&quot;&gt;
    &lt;appenders&gt;
        &lt;appender&gt;CustomLogAppender&lt;/appender&gt;
    &lt;/appenders&gt;
&lt;/logger&gt;

&lt;appender name=&quot;CustomLogAppender&quot; class=&quot;AgaviFileLoggerAppender&quot; layout=&quot;DateTimeLayout&quot;&gt;
    &lt;ae:parameters&gt;
        &lt;ae:parameter name=&quot;file&quot;&gt;%core.app_dir%/log/custom.log&lt;/ae:parameter&gt;
    &lt;/ae:parameters&gt;
&lt;/appender&gt;
</pre>
<p>Dann kann man den Logger quasi überall wo der LoggerManager verfügbar ist benutzen.</p>
<pre class="brush: php;">
$message = 'Custom logging message';
$this-&gt;getContext()-&gt;getLoggerManager()-&gt;log(new AgaviLoggerMessage($message, 'custom'), 'custom');
</pre>
<p>Und in der bash das logfile einsehen.</p>
<pre class="brush: bash;">
tail -f app/log/custom.log
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/2010/05/agavi-custom-logger-implementieren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shell Scripting Guide</title>
		<link>http://webpiraten.de/index.php/2009/12/shell-scripting-guide/</link>
		<comments>http://webpiraten.de/index.php/2009/12/shell-scripting-guide/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 16:04:51 +0000</pubDate>
		<dc:creator>sägefisch</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bin]]></category>
		<category><![CDATA[freeos]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=221</guid>
		<description><![CDATA[Hier findet Ihr den Shell Scripting Guide: freeos.com/guides/lsst/ Dann kann man beispielsweise so kleine Helferlein zum Löschen von Logs und Caches wie diesen hier basteln: #!/bin/bash cd `dirname $0` # go to scripts dir cd .. # step ahead arr[0]='Application1/app/cache/*' arr[1]='Application1/var/cache/*' arr[2]='Application2/application/cache/*' arr[3]='Application2/application/logs/*' arr[4]='Application2/pub/tmp/*' arr[5]='Application3/application/cache/*' arr[6]='Application3/application/logs/*' arr[7]='Application3/pub/tmp/*' i=0 while [ $i -lt ${#arr[@]} ] do [...]]]></description>
			<content:encoded><![CDATA[<p>Hier findet Ihr den Shell Scripting Guide:</p>
<p><a href="http://www.freeos.com/guides/lsst/" target="_blank">freeos.com/guides/lsst/</a></p>
<p>Dann kann man beispielsweise so kleine Helferlein zum Löschen von Logs und Caches wie diesen hier basteln:</p>
<pre class="brush: bash;">
#!/bin/bash
cd `dirname $0` # go to scripts dir
cd .. # step ahead
arr[0]='Application1/app/cache/*'
arr[1]='Application1/var/cache/*'
arr[2]='Application2/application/cache/*'
arr[3]='Application2/application/logs/*'
arr[4]='Application2/pub/tmp/*'
arr[5]='Application3/application/cache/*'
arr[6]='Application3/application/logs/*'
arr[7]='Application3/pub/tmp/*'

i=0
while [ $i -lt ${#arr[@]} ]
do

rm -rf ${arr[$i]}
echo &quot;${arr[$i]} deleted&quot;

(( i=$i+1 ))
done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/2009/12/shell-scripting-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
