[Ns-developers] [ns3] logging
Mathieu Lacage
mathieu.lacage at sophia.inria.fr
Wed Apr 9 17:16:47 PDT 2008
hi,
Today is not the first time I try to use unsuccessfully NS_LOG_PARAMS: I
just seem unable to figure out what its input is expected to be (the
fact that it is undocumented speaks volume) so, I looked at the code
today and I am even more confused by what its behavior is supposed to
be.
I personally would have expected something like this:
NS_LOG_PARAMS ("name0" << value0 << "name1" << value1 ...);
to print something like this:
Component:FunctionName (name0=value0, name1=value1)
but the current code is using __PRETTY_PRINT__ which basically produces
so much output that it is unreadable and my attempts at changing it to
be closer to NS_LOG_FUNCTION were unsuccessful. The code seems also
unable to print the '=' and always prints a ,.
So, it would be nice if those who understand how the code is expected to
work could try to at least document NS_LOG_PARAMS (together with its
variants NS_LOG_PARAMS_BEGIN, etc.), and, maybe make it closer to what I
expected above ? (feel free to ignore the latter if you think that I am
smoking crack). I guess I could hack this myself but, I suspect that if
I did this, I would make the code even more confusing than it is.
regards,
Mathieu
More information about the Ns-developers
mailing list