[ovs-discuss] Logging problem

sujith p s sujithpandels at gmail.com
Thu Nov 7 06:30:17 UTC 2013


Hi!
I had faced a similar problem a few months back while moving from user
switch to openvswitch.

Andy had suggested this and is working as required:
VLOG_INFO (or similar) is only for user space programs. printk may work
better with kernel modules of OVS.

Check out syslog for log messages. I personally use 'tail -f
/var/log/syslog' to track the log msgs.
Or can use 'sudo cat /proc/kmsg' to get only the kernel log messages.

Sujith



On Mon, Nov 4, 2013 at 3:18 PM, Lori Jakab <lojakab at cisco.com> wrote:

> On 11/1/13 3:12 PM, Jayanth Silesh wrote:
>
>> Hello All,
>> I just switched from the User switch to OVS implementation and trying to
>> modifying couple of stuff.
>>
>> In user switch I used to use VLOG_ERR() to output my print statements
>> where ever I could not use printf().
>> I tried the same in the OVS, I used printf() and it threw errors. So I
>> used the VLOG_ERR() to log my messages.
>>
>
> Since you are adding output for debugging purposes, it's more correct to
> use VLOG_DBG().
>
>
>  It compiled and ran but it does not log any statement in the files.
>> I have checked in the following files,
>> /var/log/syslong
>> /var/log/openvswitch/*
>>
>
> You should start ovs-vswitchd specifying the log file name.
> (--log-file=/var/log/openvswitch/ovs-vswitchd.log)
>
>
>
>> Also, is there a better logging system in OVS since I cannot use printf()
>> in all the files.
>>
>
> I'd say the VLOG logging system is good enough.
>
> HTH,
> -Lori
>
>
>
>> Thanks in advance.
>>
>> --
>> Jayanth Silesh
>> 317-476-2599
>>
>> Graduate Student,
>> University of Southern California
>>
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20131107/451083c5/attachment.html>


More information about the discuss mailing list