<?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>pastbedti.me &#187; logging</title>
	<atom:link href="http://www.pastbedti.me/tag/logging/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pastbedti.me</link>
	<description>About ruby, rails, postgresql and stuff....</description>
	<lastBuildDate>Wed, 01 Jun 2011 20:09:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>5-10 second delay when launching Terminal.app in OSX</title>
		<link>http://www.pastbedti.me/2009/09/5-10-second-delay-when-launching-terminal-in-osx/</link>
		<comments>http://www.pastbedti.me/2009/09/5-10-second-delay-when-launching-terminal-in-osx/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 20:29:36 +0000</pubDate>
		<dc:creator>Mathias Stjernström</dc:creator>
				<category><![CDATA[Operatingsystem]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://www.pastbedti.me/?p=540</guid>
		<description><![CDATA[A couple of days ago my Terminal.app (console) got a really annoying feature. When launching the console or when I created a new tab it got stuck for about 5-10 seconds before I got my prompt. If you are like me and are spending most of your time in Terminal.app you understand how annoying this [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of days ago my Terminal.app (console) got a really annoying feature. When launching the console or when I created a new tab it got stuck for about 5-10 seconds before I got my prompt. </p>
<p>If you are like me and are spending most of your time in Terminal.app you understand how annoying this is/was. </p>
<p>I tried to rename .profile, .inputrc and evey other startup script I had in my home folder but the problem did not go away. </p>
<p>Then I found an OSX user which had his Terminal crash when started. He solved his problem by cleaning up some OSX systemlogs. So I thought I try the same trick.</p>
<p>The logfiles which he removed where the asl files under /private/var/log/asl/</p>
<p>I read about them here: <a href="http://macosx.com/tech-support/can-i-deleteasl-log/24223.html">http://macosx.com/tech-support/can-i-deleteasl-log/24223.html</a></p>
<p>But I figured I&#8217;d just remove them all <img src='http://www.pastbedti.me/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo rm -rf /private/var/log/asl/*</div></td></tr></tbody></table></div>
<p>When all asl files where removed my Terminal went back to normal again and I am sooooooo relieved. </p>
<p><strong>This worked for me BUT I do not recommend you to remove anything if you do not know what you are doing!!!<br />
</strong><br />
Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastbedti.me/2009/09/5-10-second-delay-when-launching-terminal-in-osx/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>PostgreSQL logging with syslog-ng</title>
		<link>http://www.pastbedti.me/2008/12/postgresql-logging-with-syslog-ng/</link>
		<comments>http://www.pastbedti.me/2008/12/postgresql-logging-with-syslog-ng/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 22:25:16 +0000</pubDate>
		<dc:creator>Mathias Stjernström</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[pgFouine]]></category>
		<category><![CDATA[syslog ng]]></category>

		<guid isPermaLink="false">http://www.pastbedti.me/?p=293</guid>
		<description><![CDATA[Today I where about to analyze a PostgreSQL database with the wonderful pgFouine. On the machine syslog-ng where installed as logging daemon and I have never worked with PostgreSQL logging and syslog-ng. This post is about how to get them to work together. pgFouine is pretty simple to setup and the process is where well [...]]]></description>
			<content:encoded><![CDATA[<p>Today I where about to analyze a PostgreSQL database with the wonderful <a href="http://pgfouine.projects.postgresql.org/">pgFouine</a>. On the machine syslog-ng where  installed as logging daemon and I have never worked with PostgreSQL logging and syslog-ng. This post is about how to get them to work together. </p>
<p><span id="more-293"></span></p>
<p>pgFouine is pretty simple to setup and the process is where well documented at their website (<a href="http://pgfouine.projects.postgresql.org/tutorial.html">http://pgfouine.projects.postgresql.org/tutorial.html</a>).</p>
<p>However syslog-ng is very different if you are used to &#8220;normal&#8221; syslog daemon. </p>
<p>The first thing you have to do is setup PostgreSQL as the instructions says on the website. The next step is to tell syslog-ng to log you postgres data to a separate file.</p>
<p>The first thing to create in syslog-ng.conf is a destination. Destination blocks is used to send logs somewhere.</p>
<p>By adding the following row we tell syslog-ng that there is a destination called postgres and that we want this data in /var/log/pgsql.</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">destination postgres <span style="color: #7a0874; font-weight: bold;">&#123;</span> <span style="color: #c20cb9; font-weight: bold;">file</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">&quot;/var/log/pgsql&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>; <span style="color: #7a0874; font-weight: bold;">&#125;</span>;</div></td></tr></tbody></table></div>
<p>Now we are ready to add a filter to caputre our PostgreSQL data. Filters can both be used to include or exclude data from you logs. The following row in your syslog-conf captures all data sent to local0 or whatever you called it in postgresql.conf <img src='http://www.pastbedti.me/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">filter f_postgres <span style="color: #7a0874; font-weight: bold;">&#123;</span> facility<span style="color: #7a0874; font-weight: bold;">&#40;</span>local0<span style="color: #7a0874; font-weight: bold;">&#41;</span>; <span style="color: #7a0874; font-weight: bold;">&#125;</span>;</div></td></tr></tbody></table></div>
<p>It&#8217;s time to join our destination with our filter and the following line tells syslog-ng to join our source, destination and filter together.</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">log { source(src); filter(f_postgres); destination(postgres); };</div></td></tr></tbody></table></div>
<p>Put these lines in your syslog-ng.conf and restart syslog-ng and also PostgreSQL and you will have logging in a separate file! </p>
<p>Next step is to write a little guide to pgFouine <img src='http://www.pastbedti.me/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Cheers! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastbedti.me/2008/12/postgresql-logging-with-syslog-ng/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

