[Open-FCoE] [PATCH 3/6] libfc: Improve FC_DISC_DBG macro
robert.w.love at intel.com
Wed Feb 25 17:06:23 UTC 2009
On Wed, 2009-02-25 at 00:39 -0800, Abhijeet Arvind Joglekar (abjoglek)
> > -----Original Message-----
> > From: devel-bounces at open-fcoe.org
> > [mailto:devel-bounces at open-fcoe.org] On Behalf Of Robert Love
> > Sent: Tuesday, February 17, 2009 6:08 PM
> > To: devel at open-fcoe.org
> > Subject: [Open-FCoE] [PATCH 3/6] libfc: Improve FC_DISC_DBG macro
> > Macro now takes a struct disc pointer and the print format
> > is- "disc: <lport port_id>: <message>". This also converted
> > the printk level to KERN_DEBUG.
> We can also add a kern_level parameter to the macro that will indicate
> the level, and the caller can control for instance whether it should be
> KERN_DEBUG or KERN_INFO or other level.
> So, FC_DISC_DBG(disc, fmt, args...) becomes FC_DISC_DBG(kern_level,
> disc, fmt, args...)
> Which then becomes
> printk(kern_level "disc: %6x: " fmt,
I'm not in favor of this simply because the dynamic print statements are
only intended for debug and so I don't see the point in logging at a
I think that for non-debug logging, facilities like syslog allow us to
just use normal printks at various levels and the user can tune the
logging facility to determine what logging levels should be displayed in
the log file.
If you're interested in a more standard printk string (i.e. prefix) for
libfc/fcoe messages, I'd support a macro for that. We'd have to be
careful not to go too printk macro crazy though.
More information about the devel