summaryrefslogtreecommitdiffstats
path: root/glusterfs.spec.in
diff options
context:
space:
mode:
authorBala.FA <barumuga@redhat.com>2013-04-30 17:39:30 +0530
committerVijay Bellur <vbellur@redhat.com>2013-07-19 03:55:35 -0700
commit040319d8bced2f25bf25d8f6b937901c3a40e34b (patch)
tree1aedfec5fb4cd12f7cdbf341bdfbafcd4d36c6c7 /glusterfs.spec.in
parentf75957ab6baef8907c8421f44f785956fbf48038 (diff)
log: enhance syslog logging using CEE format
This patch enables to use syslog as log target in addition to the default. The logs are sent in CEE format (http://cee.mitre.org/). This logging can be disabled using compile time option by ./configure --disable-syslog (or) rpmbuild glusterfs.tar.gz --without syslog The framework provides two api void gf_openlog (const char *ident, int option, int facility); void gf_syslog (int error_code, int facility_priority, char *format, ...); consumers need to call gf_openlog() prior to gf_syslog() like the way traditional syslog function calls. error_code is mandatory when using gf_syslog(). For example, gf_openlog (NULL, -1, -1); gf_syslog (GF_ERR_DEV, LOG_ERR, "error reading configuration file"); Using syslog, admin is free to configure logger to * reduce repeated log messages * forward logs to remote logger * execute a command on certain log pattern * alert people for certain log pattern by email, snmp etc * and many more Change-Id: Ibacbcbbc547192893fc4a46b387496b622e4811f BUG: 928648 Signed-off-by: Bala.FA <barumuga@redhat.com> Reviewed-on: http://review.gluster.org/4915 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'glusterfs.spec.in')
-rw-r--r--glusterfs.spec.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index 85c656d7277..96918fac3a2 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -31,6 +31,10 @@
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without ocf
%{?_without_ocf:%global _without_ocf --without-ocf}
+# if you wish to build rpms without syslog logging, compile like this
+# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@tar.gz --without syslog
+%{?_without_syslog:%global _without_syslog --disable-syslog}
+
%if ( 0%{?fedora} && 0%{?fedora} > 16 ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
%global _with_systemd true
%endif
@@ -323,7 +327,7 @@ This package provides the api include files.
%build
./autogen.sh
-%configure %{?_without_rdma} %{?_without_epoll} %{?_without_fusermount} %{?_without_georeplication} %{?_without_ocf}
+%configure %{?_without_rdma} %{?_without_epoll} %{?_without_fusermount} %{?_without_georeplication} %{?_without_ocf} %{?_without_syslog}
# fix hardening and remove rpath in shlibs
%if ( 0%{?fedora} && 0%{?fedora} > 17 ) || ( 0%{?rhel} && 0%{?rhel} > 6 )