public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: "Fabio M. Di Nitto" <fabbione@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: master - ccs: move to the new logsys init API Date: Mon, 04 Aug 2008 21:49:00 -0000 [thread overview] Message-ID: <20080804135824.827C912003F@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=0ca6a6a2dda71909275738d929dd72306d3039c3 Commit: 0ca6a6a2dda71909275738d929dd72306d3039c3 Parent: 87f7e54e6b463275cbc663698e8af060ebc8ebf8 Author: Fabio M. Di Nitto <fdinitto@redhat.com> AuthorDate: Mon Aug 4 15:57:26 2008 +0200 Committer: Fabio M. Di Nitto <fdinitto@redhat.com> CommitterDate: Mon Aug 4 15:57:26 2008 +0200 ccs: move to the new logsys init API Change ccs daemon to use the new logsys API. Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com> --- ccs/daemon/ccsd.c | 10 +++------- ccs/daemon/cluster_mgr.c | 2 -- ccs/daemon/cnx_mgr.c | 2 -- ccs/daemon/misc.c | 2 -- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/ccs/daemon/ccsd.c b/ccs/daemon/ccsd.c index 89e9e5e..ee5e02d 100644 --- a/ccs/daemon/ccsd.c +++ b/ccs/daemon/ccsd.c @@ -41,13 +41,6 @@ static int join_group(int sfd, int loopback, int port); static int setup_local_socket(int backlog); static inline void process_signals(void); -LOGSYS_DECLARE_SYSTEM (NULL, - LOG_MODE_OUTPUT_STDERR | LOG_MODE_OUTPUT_SYSLOG_THREADED | LOG_MODE_OUTPUT_FILE | LOG_MODE_BUFFER_BEFORE_CONFIG, - LOGDIR "/ccs.log", - SYSLOGFACILITY); - -LOGSYS_DECLARE_SUBSYS ("CCS", SYSLOGLEVEL); - int main(int argc, char *argv[]){ int i,error=0; int trueint = 1; @@ -60,6 +53,8 @@ int main(int argc, char *argv[]){ char *msg; unsigned int logmode; + logsys_init("CCS", LOG_MODE_OUTPUT_STDERR | LOG_MODE_OUTPUT_SYSLOG_THREADED | LOG_MODE_OUTPUT_FILE | LOG_MODE_FILTER_DEBUG_FROM_SYSLOG | LOG_MODE_BUFFER_BEFORE_CONFIG, SYSLOGFACILITY, SYSLOGLEVEL, LOGDIR "/ccs.log"); + msg = parse_cli_args(argc, argv); if(getenv("CCS_DEBUGLOG")) @@ -259,6 +254,7 @@ int main(int argc, char *argv[]){ } } } + logsys_exit(); exit(EXIT_SUCCESS); } diff --git a/ccs/daemon/cluster_mgr.c b/ccs/daemon/cluster_mgr.c index d8c06c7..46779b7 100644 --- a/ccs/daemon/cluster_mgr.c +++ b/ccs/daemon/cluster_mgr.c @@ -37,8 +37,6 @@ static int select_retry(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *xfds, static ssize_t read_retry(int fd, void *buf, int count, struct timeval *timeout); -LOGSYS_DECLARE_SUBSYS ("CCS", LOG_INFO); - static int check_update_doc(xmlDocPtr tmp_doc) { int error = 0; diff --git a/ccs/daemon/cnx_mgr.c b/ccs/daemon/cnx_mgr.c index 0c04082..21b7ff6 100644 --- a/ccs/daemon/cnx_mgr.c +++ b/ccs/daemon/cnx_mgr.c @@ -54,8 +54,6 @@ typedef struct open_connection_s { time_t oc_expire; } open_connection_t; -LOGSYS_DECLARE_SUBSYS ("CCS", LOG_INFO); - /* ATTENTION: need to lock on this if we start forking the daemon ** ** Also would need to create a shared memory area for open cnx's */ static open_connection_t **ocs = NULL; diff --git a/ccs/daemon/misc.c b/ccs/daemon/misc.c index 0a9cb07..168944b 100644 --- a/ccs/daemon/misc.c +++ b/ccs/daemon/misc.c @@ -29,8 +29,6 @@ pthread_mutex_t update_lock; open_doc_t *master_doc = NULL; -LOGSYS_DECLARE_SUBSYS ("CCS", LOG_INFO); - /** * do_simple_xml_query * @ctx: xml context
reply other threads:[~2008-08-04 13:59 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080804135824.827C912003F@lists.fedorahosted.org \ --to=fabbione@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).