[PATCH 01/10] Add GTP hub stub, as simplistic UDP forwarder.

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Harald Welte laforge at gnumonks.org
Thu Oct 8 15:00:08 UTC 2015


Hi Neels,

On Wed, Oct 07, 2015 at 04:18:19PM +0200, Neels Hofmeyr wrote:
> +#define LOGERR(fmt, args...) \
> +	LOGP(DGTPHUB, LOGL_ERROR, fmt, ##args)
> +
> +#define LOG(fmt, args...) \
> +	LOGP(DGTPHUB, LOGL_NOTICE, fmt, ##args)

we typically don't do this in the Osmo* codebase,bt use the full
statement.  However, it is your choice.

The problem I see with this is that you reduce/remove the flexibility of
using multiplelog subsstems and levels.  You more or less assume that
there will always only be two log levels used, and all messages will use
the same subsystem.  Is that really the case?

When the full statement is used everytime, it is also easier to later
change / tune the logging levels of certain statements, which is
typically what happens after you run it in production with thousands of
messages flowing through and you see what kind of granularity makes
sense.

Also, I think in patch 10/10 you state 'add debug messages' but then
use the LOG() macro.  So in fact you are adding NOTICE messages, not
DEBUG messages.  So either of the two statements is wrong.

-- 
- Harald Welte <laforge at gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)



More information about the OpenBSC mailing list