Edge-home-orchestration-go: [DataStorage] Two types of Logger

Created on 11 Nov 2020  ·  2Comments  ·  Source: lf-edge/edge-home-orchestration-go

DataStorage uses the package log and the logger of edgex.
As a result, there are separate log files for edgex and for edge-orchestration in /var/edge-orchestration/log/logmgr.log with different style.

level=INFO ts=2020-11-11T07:43:11.040198344Z app=datastorage source=init.go:138 msg="Check Metadata service's status ..."
level=INFO ts=2020-11-11T07:43:11.040289585Z app=datastorage source=init.go:138 msg="Check Data service's status ..."
level=ERROR ts=2020-11-11T07:43:11.042473566Z app=datastorage source=init.go:149 msg="Error getting ping: Get \"http://localhost:48081/api/v1/ping\": dial tcp 127.0.0.1:48081: connect: connection refused "
level=ERROR ts=2020-11-11T07:43:11.043495198Z app=datastorage source=init.go:149 msg="Error getting ping: Get \"http://localhost:48080/api/v1/ping\": dial tcp 127.0.0.1:48080: connect: connection refused "
2020/11/11 07:43:11 discovery.go:562: [deviceDetectionRoutine] edge-orchestration-3125da9e-1e9a-41aa-ac83-004725eb2d1e
2020/11/11 07:43:11 discovery.go:563: [deviceDetectionRoutine] confInfo    : ExecType(container), Platform(docker)
2020/11/11 07:43:11 discovery.go:564: [deviceDetectionRoutine] netInfo     : IPv4([]), RTT(0)
2020/11/11 07:43:11 discovery.go:565: [deviceDetectionRoutine] serviceInfo : Services([])
2020/11/11 07:43:11 discovery.go:566:

I think we should have same style at least.

bug refactoring

All 2 comments

Plus, what we would like to also consider about is as follows:

  1. Evaluate any needs to setup and/or employ the existing regarding standard way of log representation style;
  2. Evaluate any needs to setup an abstract layer to embrace a variety of log styles that any developers would rely on for their own perspective.

@suresh-lc @sun-sharma What do you think of your opinions about @t25kim and myself?

Good point brought out. Will check on making common logging style.

Was this page helpful?
0 / 5 - 0 ratings