All of lore.kernel.org
 help / color / mirror / Atom feed
From: pcaulfield@sourceware.org <pcaulfield@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW daemons/clvmd/lvm-functions.c
Date: 24 Aug 2007 08:29:41 -0000	[thread overview]
Message-ID: <20070824082941.5534.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	pcaulfield at sourceware.org	2007-08-24 08:29:40

Modified files:
	.              : WHATS_NEW 
	daemons/clvmd  : lvm-functions.c 

Log message:
	Fix clvmd logging so you can get lvm-level debugging out of it.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.694&r2=1.695
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.33&r2=1.34

--- LVM2/WHATS_NEW	2007/08/23 15:02:26	1.694
+++ LVM2/WHATS_NEW	2007/08/24 08:29:39	1.695
@@ -1,5 +1,6 @@
 Version 2.02.28 -
 ================================
+  Fix clvmd logging so you can get lvm-level debugging out of it.
   Introduce VG_GLOBAL lock type for vgscan/pvscan to trigger clvmd -R.
   Fix clvmd -R, so it fully refreshes the caches.
   Change lvconvert_mirrors to use mirror segtype not striped.
--- LVM2/daemons/clvmd/lvm-functions.c	2007/08/23 12:44:09	1.33
+++ LVM2/daemons/clvmd/lvm-functions.c	2007/08/24 08:29:39	1.34
@@ -548,6 +548,15 @@
 static void lvm2_log_fn(int level, const char *file, int line,
 			const char *message)
 {
+
+	/* Send messages to the normal LVM2 logging system too,
+	   so we get debug output when it's asked for. 
+ 	   We need to NULL the function ptr otherwise it will just call
+	   back into here! */
+	init_log_fn(NULL);
+	print_log(level, file, line, "%s", message);
+	init_log_fn(lvm2_log_fn);
+
 	/*
 	 * Ignore non-error messages, but store the latest one for returning
 	 * to the user.
@@ -601,7 +610,10 @@
 
 	/* Use LOG_DAEMON for syslog messages instead of LOG_USER */
 	init_syslog(LOG_DAEMON);
-	init_debug(_LOG_ERR);
+	openlog("clvmd", LOG_PID, LOG_DAEMON);
+	init_debug(cmd->current_settings.debug);
+	init_verbose(cmd->current_settings.verbose + VERBOSE_BASE_LEVEL);
+	set_activation(cmd->current_settings.activation);
 
 	/* Check lvm.conf is setup for cluster-LVM */
 	check_config();



             reply	other threads:[~2007-08-24  8:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-24  8:29 pcaulfield [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-01  9:54 LVM2 ./WHATS_NEW daemons/clvmd/lvm-functions.c zkabelac
2012-02-23 22:50 zkabelac
2011-08-10 11:00 mbroz
2011-03-02 23:38 mbroz
2010-07-01 21:23 mbroz
2010-03-24 22:25 snitzer
2010-01-26  8:00 mbroz
2009-12-09 19:01 mbroz
2009-12-09 19:00 mbroz
2009-12-09 18:55 mbroz
2009-12-09 18:45 mbroz
2009-10-22 17:45 agk
2009-10-01 14:14 ccaulfield
2009-08-05 14:18 ccaulfield
2009-03-05 16:25 mbroz
2008-04-08 13:03 ccaulfield
2008-04-04  8:53 ccaulfield
2007-08-23 12:19 pcaulfield
2007-04-24 15:13 pcaulfield

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=20070824082941.5534.qmail@sourceware.org \
    --to=pcaulfield@sourceware.org \
    --cc=lvm-devel@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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.