[sane-devel] [RFC] DBG levels

Stéphane VOLTZ stef.dev at free.fr
Thu Apr 19 04:57:18 UTC 2007


	I found myself defining debugging levels quite a few time, and not allways in 
a consistent manner. So I'm thinking that having well knowns debugging levels 
defined in sanei_debug.h would be a good idea. 
	However, it seems that after a quick grep for DBG_ in .h that there are at 
least 2 different usage: increasing debugging levels (most backends) 
and 'bitmap' (at least one backend):
DBG_ALL         0xFF
DBG_ASIC                6
DBG_ASSERT              1
DBG_CRIT                0
DBG_data                8
DBG_DBG         10
DBG_DET         4
DBG_ERR         1
DBG_ERR         16
DBG_error0              0
DBG_error               1
DBG_FUNC                5
DBG_HELPERS             0x08
DBG_HIGH                0x04
DBG_info2               6
DBG_INFO                3
DBG_info                4
DBG_info                5
DBG_init                2
DBG_inquiry             4
DBG_IO          0x40
DBG_io2         7
DBG_io          6
DBG_IOF         0x80
DBG_LOW         0x01
DBG_MEDIUM              0x02
DBG_MSG         32
DBG_proc                5
DBG_proc                7
DBG_read                8
DBG_sane_info           12
DBG_sane_init           10
DBG_sane_option         13
DBG_sane_proc           11
DBG_SCAN                0x20
DBG_sense               2
DBG_TIMEOUT             0x10
DBG_WARN                2
DBG_warn                3
DBG_warning             3

	IMHO, having only one way of defining debugging levels would be  great, but I 
haven't set my mind on the best approach. Any thoughts ?


More information about the sane-devel mailing list