![]() |
lvs-devel
|
| To: | Jan Engelhardt <jengelh@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [RFC][PATCH 1/5] IPVS: prefix EnterFunction and LeaveFunction msg with "IPVS:" |
| Cc: | lvs-devel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx |
| From: | Hannes Eder <heder@xxxxxxxxxx> |
| Date: | Tue, 28 Jul 2009 13:15:04 +0200 |
On Mon, Jul 27, 2009 at 20:14, Jan Engelhardt<jengelh@xxxxxxxxxx> wrote:
>
> On Monday 2009-07-27 15:46, Hannes Eder wrote:
>>
>>Now all printk messages from IPVS are prefixed with "IPVS:".
>>
>>+#define EnterFunction(level)
>>\
>>+ do {
>>\
>>+ if (level <= ip_vs_get_debug_level())
>> \
>>+ printk(KERN_DEBUG "IPVS: Enter: %s, %s line %i\n",
>>\
>>+ __func__, __FILE__, __LINE__);
>>\
>>+ } while (0)
>>+#define LeaveFunction(level)
>>\
>>+ do {
>>\
>>+ if (level <= ip_vs_get_debug_level())
>> \
>>+ printk(KERN_DEBUG "IPVS: Leave: %s, %s line %i\n",
>>\
>>+ __func__, __FILE__, __LINE__);
>>\
>>+ } while (0)
>
> I think you should rather make use of pr_fmt:
>
> <before any #includes>
> #define pr_fmt(x) "IPVS: " x
>
> And then use pr_<level>("Elvis has left the building") in code. This
> will add IPVS: automatically to all pr_* calls, alleviating the need
> to manually type it into all printks.
I like this idea. I'll come up with an extra patch, it does not fit
into this series anyway.
> Of course, if you only want it for the two defines here, scrap
> my idea :)
>
Cheers,
-Hannes
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [RFC][PATCH 5/5] libxt_ipvs: user space lib for netfilter matcher xt_ipvs, Jan Engelhardt |
|---|---|
| Next by Date: | Re: [RFC][PATCH 5/5] libxt_ipvs: user space lib for netfilter matcher xt_ipvs, Hannes Eder |
| Previous by Thread: | Re: [RFC][PATCH 1/5] IPVS: prefix EnterFunction and LeaveFunction msg with "IPVS:", Jan Engelhardt |
| Next by Thread: | [RFC][PATCH 4/5] IPVS: debugging output for ip_vs_update_conntrack, Hannes Eder |
| Indexes: | [Date] [Thread] [Top] [All Lists] |