[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GNUnet-developers] GNUNET_assert cannot specify component to log fr
Re: [GNUnet-developers] GNUNET_assert cannot specify component to log from?
Sat, 3 Dec 2016 11:21:52 +0100
Florian Dold wrote:
> Assertions and logging are really in a different category, they don't
> quite serve the same purpose. You don't really need the component since
> asserts give you the source file and line already.
Well, assertions use logging to inform the user about a problem in a more
detailed way before aborting the programm so logging is at least used in the
"assertion" category. The assert macros only give the filename, which might not
help much if the assertion comes from an internal "util.c" file.
> If you think that the component is relevant for your log output, it
> likely means that you should use GNUNET_log instead of
It was not for one special case, but in general.
> > Also why does the GNUNET_log family not always end the log message with '\n'
> > as a convenience? I could not find a function GNUNET_log_resume or something
> > similar which would use that as a feature and not print the log header
> > again.
> Mostly so that GNUNET_log behaves like printf, but with a logging header
> prepended ;-)
> I'm not against changing it, but I also don't really see a big benefit. If
> nobody opposes it and you decide to change it, please also change it in the
> GNU Taler merchant/exchange repos which depend on GNUnet.
Well that reasoning makes sense as well. I don't have a very strong opinion on
the proposed change either, so I'll wait for more feedback or just leave it as