usnistgov / ndn-dpdk

NDN-DPDK: High-Speed Named Data Networking Forwarder
https://www.nist.gov/publications/ndn-dpdk-ndn-forwarding-100-gbps-commodity-hardware
Other
131 stars 26 forks source link

Log version on start #22

Closed Pesa closed 3 years ago

Pesa commented 3 years ago

We should log the version number (or commit hash) when the service starts, to facilitate debugging issues and helping users who provide the logs but not the version they are running. Other key info on the platform, environment, and/or versions of other key dependencies could potentially be included as well (saves one Q&A roundtrip).

yoursunny commented 3 years ago

This is applied to ndndpdk-svc command. Sample output:

{
  "level": "info",
  "ts": 1629734705.6987371,
  "logger": "main",
  "msg": "NDN-DPDK service starting",
  "version": "v0.0.0-20210823160036-1f3a732fac8e",
  "uid": 0,
  "linux": "5.4.0-81-generic",
  "dpdk": "DPDK 21.08.0",
  "spdk": "SPDK v21.07"
}
yoursunny commented 3 years ago

Done in 1f3a732fac8ec638e178dd1895583003d4a72b3b