summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
Diffstat (limited to 'files')
-rw-r--r--files/couch-doc-update6
1 files changed, 5 insertions, 1 deletions
diff --git a/files/couch-doc-update b/files/couch-doc-update
index 7cc5799..625847f 100644
--- a/files/couch-doc-update
+++ b/files/couch-doc-update
@@ -1,4 +1,5 @@
#!/usr/bin/ruby
+require 'syslog'
#
# This script will update the values of a particular couchdb document. The benefit of this little script over
@@ -37,7 +38,10 @@ def main
exit 0 if result['ok']
raise StandardError.new(result.inspect)
rescue StandardError => exc
- puts "ERROR: " + exc.to_s
+ $stderr.puts "ERROR: " + exc.to_s
+ Syslog.open do |logger|
+ logger.log(Syslog::LOG_CRIT, exc.to_s)
+ end
exit 1
end