6WIND / zrpcd

Zebra/Quagga RPC communicator to handle Quagga framework from a SDN controller
GNU General Public License v2.0
5 stars 10 forks source link

Make logging level configurable without requiring recompilation #14

Open rski opened 7 years ago

rski commented 7 years ago

or document if it is available via an rpc somewhere

pguibert6WIND commented 7 years ago

could you please be more explicit about that. you mean log messages from zrpc?

rski commented 7 years ago

Ah sorry, I had this in my head but didn't write it down.

Here: https://github.com/6WIND/zrpcd/blob/master/zrpcd/zrpc_debug.h#L19

define IS_ZRPC_DEBUG (zrpc_debug & ZRPC_DEBUG)

ZRPC_DEBUG is true but it seems like zrpcd_debug is initialised to false and I can't figure out how to modify it using the constructs defined here

pguibert6WIND commented 7 years ago

The logging level is set by default to on in function zrpc_debug_init(). To change the logging level, there is a thrift API called setLogConfig() that is handling the severity and where to dump the traces. open to suggestions.