new debug / logging architecture

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/.

Holger Freyther zecke at selfish.org
Tue Dec 22 12:59:37 UTC 2009


On Thursday 17 December 2009 22:04:27 Harald Welte wrote:
> Hi Holger,
> 
> I'm happy with the new architecture.  During testing I made a couple of bug
> fixes, which I applied to the new 'new-debug-arch' branch in the root
>  directory of the git branch namespace. (i.e. not prefixed with holger/).
> 
> It would be great if you could finish this work so we can benefit of it
> before the congress.
> 
> I'll probably merge some initial parts already now (at least the new macro
> definitions) to start using log levels in the actual code - even if it
> doesn't get used yet.

I have added what I think were missing features. Two things are missing, one 
is more heavy testing and the other is considering method renaming.

What I have added during the day:
	- Be able to set a global loglevel (ala setloglevel of syslog)
	- Set print timestamp, use color per debug target
	- Filter the debug_mask per target
	- Remove the debug mask and replace it with an array
          struct debug_category that contains the loglevel and enabled
	  state.
        - The -d argument on bsc_hack (and via vty) can now handle
          CategoryName1:CategoryName,OptionalLogLevel... The ',' and
          ':' are a bit backwards due compabilitiy...
        - It is possible to set the category enabled state and the log
          level via VTY.
	- I have verified that the loglevel and enabled state is working

so please review it once again, and then I think it would be great to
merge it before the 26c3.

regards
	holger







More information about the OpenBSC mailing list