{"id":1887,"date":"2010-08-29T08:00:26","date_gmt":"2010-08-29T16:00:26","guid":{"rendered":"http:\/\/www.chesnok.com\/daily\/?p=1887"},"modified":"2012-03-26T02:51:57","modified_gmt":"2012-03-26T10:51:57","slug":"using-logger-with-pg_standby","status":"publish","type":"post","link":"https:\/\/www.chesnok.com\/daily\/2010\/08\/29\/using-logger-with-pg_standby\/","title":{"rendered":"Using logger with pg_standby"},"content":{"rendered":"<p>Piping logs to syslog is pretty useful for automating log rotation and forwarding lots of different logs to a central log server. <\/p>\n<p>To that end, the command-line utility &#8216;logger&#8217; is nice for piping output from utilities like pg_standby without having to add syslogging code to the utility itself. Another thing is that logger comes by default with modern packages of syslog.<\/p>\n<p>Here&#8217;s an easy way to implement this: <\/p>\n<p><code><br \/>\nrestore_command = 'pg_standby -d -s 2 -t \/pgdata\/trigger \/shared\/wal_archive\/ %f %p %r 2>&1 | logger -p local3.info -t pgstandby'<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Piping logs to syslog is pretty useful for automating log rotation and forwarding lots of different logs to a central log server. To that end, the command-line utility &#8216;logger&#8217; is nice for piping output from utilities like pg_standby without having &hellip; <a href=\"https:\/\/www.chesnok.com\/daily\/2010\/08\/29\/using-logger-with-pg_standby\/\">Continue reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[97,9],"tags":[344,340,343,342,647,624,341],"class_list":["post-1887","post","type-post","status-publish","format-standard","hentry","category-postgres","category-postgresql","tag-hotstandby","tag-logger","tag-pgstandby","tag-pg_standby","tag-postgres","tag-postgresql","tag-syslog"],"_links":{"self":[{"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/posts\/1887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/comments?post=1887"}],"version-history":[{"count":7,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/posts\/1887\/revisions"}],"predecessor-version":[{"id":3960,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/posts\/1887\/revisions\/3960"}],"wp:attachment":[{"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/media?parent=1887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/categories?post=1887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chesnok.com\/daily\/wp-json\/wp\/v2\/tags?post=1887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}