facebook / fboss

Facebook Open Switching System Software for controlling network switches.
Other
866 stars 301 forks source link

Logging in qsfp_service #75

Closed bluecmd closed 6 years ago

bluecmd commented 6 years ago

Hi,

I fail to see how folly is configuredi n qsfp_service. In wedge_agent there is:

FOLLY_INIT_LOGGING_CONFIG("fboss=DBG2; default:async=true");

but this seems to be omitted in qsfp_service. I've been unsuccessful in trying to make any useful log messages appear except the ones that use VLOG().

bluecmd commented 6 years ago

Digging around in folloy I found references to the --logging variable. That seems to have done the trick.

E.g.:

dhtech@wedge1:/usr/local/bin$ sudo /usr/local/bin/qsfp_service -alsologtostderr -v=2000 -vmodule='EventBase=0,AsyncSocket=0,CP2112=0' -mode=wedge  --logging=.=DBG3
E1006 20:51:58.115734  3571 WedgeProductInfo.cpp:136] json parse error on line 0: expected json value
E1006 20:51:58.115974  3571 WedgeProductInfo.cpp:67] json parse error on line 0: expected json value
I1006 20:51:58.141532  3571 BaseWedgeI2CBus.cpp:26] successfully opened wedge CP2112 I2C bus
I1006 20:51:58.146821  3571 BaseWedgeI2CBus.cpp:93] selecting QSFP 1
V1006 20:51:58.152747  3571 QsfpModule.cpp:694] Not all ports present in transceiver 0 (expected=4). Skip customization
I1006 20:51:58.152942  3571 WedgeManager.cpp:33] making QSFP for 0
I1006 20:51:58.175518  3571 BaseWedgeI2CBus.cpp:26] successfully opened wedge CP2112 I2C bus
I1006 20:51:58.175554  3571 BaseWedgeI2CBus.cpp:93] selecting QSFP 2
V1006 20:51:58.181612  3571 QsfpModule.cpp:694] Not all ports present in transceiver 1 (expected=4). Skip customization
I1006 20:51:58.181701  3571 WedgeManager.cpp:33] making QSFP for 1