[Olsr-dev] How to enable logging in olsr2?

Benjamin Valentin (spam-protected)
Fri May 31 04:52:44 CEST 2013


Thank you a lot for your very detailed mail!
But since on RIOT, I neither have a command line nor config files, I'm
trying to enable logging with 

cfg_cmd_handle_set(oonf_cfg_get_instance(), oonf_cfg_get_rawdb(), "log.debug=all", NULL);

This works when I insert it in oonf_main.c, but on my slightly
butchered version [1] of it (just stripped of signal handling and
command line parsing), the line doesn't seem to have any effect as I
only receive WARN messages still.

2013-05-31 04:33:32,636 - INFO # initializing timer…
2013-05-31 04:33:32,665 - INFO # TODO: select not implemented
2013-05-31 04:33:32,701 - INFO # 	select(0, 0x0, 0x0, 0x0, 2.100000)
2013-05-31 04:33:32,777 - INFO # (null) WARN(socket) oonf_socket.c 224: select error: Bad file number (9)
2013-05-31 04:33:32,806 - INFO # TODO: select not implemented
2013-05-31 04:33:32,842 - INFO # 	select(0, 0x0, 0x0, 0x0, 0.500000)
2013-05-31 04:33:32,975 - INFO # (null) WARN(socket) oonf_socket.c 224: select error: Bad file number (9)
2013-05-31 04:33:33,039 - INFO # (null) WARN(main) main.c 227: Grace period for shutdown failed.

(disregard select() being not available yet…)

The previous cfg_db_add_namedsection(oonf_cfg_get_rawdb(), CFG_INTERFACE_SECTION, "if0");
however seems to work, since without it I get

2013-05-31 04:32:04,993 - INFO # (null) WARN(config) oonf_cfg.c 304: Configuration validation failed
2013-05-31 04:32:05,039 - INFO # Missing mandatory section of type 'interface'
2013-05-31 04:32:05,085 - INFO # Missing mandatory section of type 'interface'
2013-05-31 04:32:05,131 - INFO # Missing mandatory section of type 'interface'

I know this is not your concern/code, but maybe you can give me a pointer
to what might be missing here.

Thank you
Benjamin

[1] https://github.com/benpicco/olsrd2/blob/master/riot/main.c#L152




More information about the Olsr-dev mailing list