[couchdb/f20] silence stdout/stderr to prevent redundant flooding of /var/log/messages CouchDB already logs these
Warren Togami
wtogami at fedoraproject.org
Thu Jul 3 09:20:01 UTC 2014
commit 7b4ed8ab0f2921d0b18decd4484d894dfedebff7
Author: Warren Togami <wtogami at gmail.com>
Date: Wed Jul 2 23:19:14 2014 -1000
silence stdout/stderr to prevent redundant flooding of /var/log/messages
CouchDB already logs these messages to /var/log/couchdb/couch.log
...ilence-redundant-logging-to-stdout-stderr.patch | 32 ++++++++++++++++++++
couchdb.spec | 8 ++++-
2 files changed, 39 insertions(+), 1 deletions(-)
---
diff --git a/couchdb-0011-Silence-redundant-logging-to-stdout-stderr.patch b/couchdb-0011-Silence-redundant-logging-to-stdout-stderr.patch
new file mode 100644
index 0000000..5b6fc36
--- /dev/null
+++ b/couchdb-0011-Silence-redundant-logging-to-stdout-stderr.patch
@@ -0,0 +1,32 @@
+From 590ea6ed73126f520d5fd06297f32810bd59a968 Mon Sep 17 00:00:00 2001
+From: Warren Togami <wtogami at gmail.com>
+Date: Wed, 2 Jul 2014 22:54:38 -1000
+Subject: [PATCH 11/11] Silence redundant logging to stdout/stderr
+
+CouchDB already logs everything to /var/log/couchdb/couch.log.
+The stdout/stderr redundantly floods /var/log/messages.
+
+This temporary hack was suggested by rnewson in #couchdb.
+
+https://issues.apache.org/jira/browse/COUCHDB-2264
+Related issue
+---
+ src/couchdb/couch_log.erl | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/couchdb/couch_log.erl b/src/couchdb/couch_log.erl
+index cd4bbbb..db483a7 100644
+--- a/src/couchdb/couch_log.erl
++++ b/src/couchdb/couch_log.erl
+@@ -204,7 +204,7 @@ terminate(_Arg, #state{fd = Fd}) ->
+ file:close(Fd).
+
+ log(#state{fd = Fd}, ConsoleMsg, FileMsg) ->
+- ok = io:put_chars(ConsoleMsg),
++ %ok = io:put_chars(ConsoleMsg),
+ ok = io:put_chars(Fd, FileMsg).
+
+ get_log_messages(Pid, Level, Format, Args) ->
+--
+1.9.3
+
diff --git a/couchdb.spec b/couchdb.spec
index 7fce600..69998d1 100644
--- a/couchdb.spec
+++ b/couchdb.spec
@@ -8,7 +8,7 @@
Name: couchdb
Version: 1.6.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A document database server, accessible via a RESTful JSON API
Group: Applications/Databases
@@ -29,6 +29,7 @@ Patch7: couchdb-0007-Change-respawn-timeout-to-0.patch
Patch8: couchdb-0008-Fix-for-Erlang-R16B01.patch
Patch9: couchdb-0009-README-was-renamed.patch
Patch10: couchdb-0010-Use-_DEFAULT_SOURCE-instead-of-obsolete-_BSD_SOURCE.patch
+Patch11: couchdb-0011-Silence-redundant-logging-to-stdout-stderr.patch
BuildRequires: autoconf
BuildRequires: autoconf-archive
@@ -108,6 +109,7 @@ JavaScript acting as the default view definition language.
%if 0%{?fedora} > 20
%patch10 -p1 -b .default_instead_of_bsd
%endif
+%patch11 -p1 -b .redundant_logging
#gzip -d -k ./share/doc/build/latex/CouchDB.pdf.gz
# Remove bundled libraries
@@ -231,6 +233,10 @@ fi
%changelog
+* Wed Jul 02 2014 Warren Togami <wtogami at gmail.com> - 1.6.0-3
+- silence stdout/stderr to prevent redundant flooding of /var/log/messages
+ CouchDB already logs these messages to /var/log/couchdb/couch.log
+
* Mon Jun 23 2014 Peter Lemenkov <lemenkov at gmail.com> - 1.6.0-2
- Fix building with sligntly older gcc/glibc
More information about the scm-commits
mailing list