[OpenAFS-devel] Making VLLog more useful.

Steve McIntosh stevemac@endpoint.com
Mon, 20 Oct 2008 09:56:20 -0700


--Apple-Mail-22--746038436
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: 7bit

The VLog() macro basically translates a call to it into a call to  
ViceLog, forcing the log level to 5. This means that every message, no  
matter how important or how trivial shows up at the same log level,  
burying important messages in unimportant noise.

Attached is a patch which passes the desired log level through instead  
of just setting it to 5. I'm also working on a patch which changes a  
few of the most "chatty" status messages to log level 25 so that they  
don't pollute the log when the log level is set to 5.

I tracked the original change all the way back to release 1.2, but  
there were no comments as to why the change was made. Is there some  
reason to force everything to log level 5?

-- 
Steve McIntosh
End Point Corporation
http://www.endpoint.com




--Apple-Mail-22--746038436
Content-Disposition: attachment;
	filename=pass-level-through-vlog-2008-10-20.diff
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="pass-level-through-vlog-2008-10-20.diff"
Content-Transfer-Encoding: 7bit

diff --git a/src/vlserver/vlserver.p.h b/src/vlserver/vlserver.p.h
index 141e626..24dd3b1 100644
--- a/src/vlserver/vlserver.p.h
+++ b/src/vlserver/vlserver.p.h
@@ -126,7 +126,7 @@ struct extentaddr {
 #define	ex_addrs	_ex_un._ex_addrentry.addrs
 #define	ex_uniquifier	_ex_un._ex_addrentry.uniquifier
 
-#define VLog(level, str)   ViceLog(5, str)
+#define VLog(level, str)   ViceLog(level, str)
 
 extern int FreeBlock(struct ubik_trans *trans, afs_int32 blockindex);
 

--Apple-Mail-22--746038436
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed
Content-Transfer-Encoding: 7bit







--Apple-Mail-22--746038436--