kubedl-io/kubedl

[feature request] consolidate logger library with `klog`

Opened this issue · 0 comments

What would you like to be added:

the logging in stdout is mixed with multiple formats for we using logging libraries mixture across different packages and controller implementations, consolidating loggers with a union one is more sensible.

WARN[0008] The restart policy of replica Worker of the job xdl-test is not OnFailure or Always. Not counted in backoff limit. 
2021-11-03T11:49:24.862+0800    INFO    xdl-controller  job deleted     {"namespace": "kubedl", "name": "xdl-test"}
2021-11-03T11:49:24.862+0800    DEBUG   controller      Successfully Reconciled {"controller": "XDLController", "name": "xdl-test", "namespace": "kubedl"}
2021-11-03T11:49:24.862+0800    DEBUG   controller-runtime.manager.events       Normal  {"object": {"kind":"XDLJob","namespace":"kubedl","name":"xdl-test","uid":"5bf3ebf1-447b-47be-94f6-d37ed2df78d0","apiVersion":"training.kubedl.io/v1alpha1","resourceVersion":"7747965776"}, "reason": "SuccessfulDeleteJob", "message": "Deleted job: xdl-test"}
2021-11-03T11:49:24.864+0800    INFO    xdl-controller  xdl job not found       {"namespace": "kubedl", "name": "xdl-test"}
2021-11-03T11:49:24.864+0800    INFO    xdl-controller  xdl job not found       {"namespace": "kubedl", "name": "xdl-test"}
INFO[0008] Reconciling for job xdl-test-dmffc           
WARN[0008] The restart policy of replica Worker of the job xdl-test-dmffc is not OnFailure or Always. Not counted in backoff limit. 
INFO[0008] reconciles for replica type: Worker          
INFO[0008] Need to create new pod: worker-0              job=kubedl.xdl-test-dmffc replica-type=worker uid=b9f7cfbc-c7d6-43e5-b0c0-b874218b6474
INFO[0008] Need to create new pod: worker-1              job=kubedl.xdl-test-dmffc replica-type=worker uid=b9f7cfbc-c7d6-43e5-b0c0-b874218b6474
2021-11-03T11:49:24.997+0800    DEBUG   controller-runtime.manager.events       Normal  {"object": {"kind":"XDLJob","namespace":"kubedl","name":"xdl-test-dmffc","uid":"b9f7cfbc-c7d6-43e5-b0c0-b874218b6474","apiVersion":"training.kubedl.io/v1alpha1","resourceVersion":"7747965313"}, "reason": "SuccessfulCreatePod", "message": "Created pod: xdl-test-dmffc-worker-0"}
INFO[0008] This pod's job does not exist, pod name: xdl-test-dmffc-worker-0  job= pod=kubedl.xdl-test-dmffc-worker-0 uid=d5897ffd-d33c-4d43-8eeb-b29dfe5bb258
INFO[0008] This pod's job does not exist, pod name: xdl-test-dmffc-worker-0  job= pod=kubedl.xdl-test-dmffc-worker-0 uid=d5897ffd-d33c-4d43-8eeb-b29dfe5bb258
INFO[0008] This pod's job does not exist, pod name: xdl-test-dmffc-worker-0  job= pod=kubedl.xdl-test-dmffc-worker-0 uid=d5897ffd-d33c-4d43-8eeb-b29dfe5bb258

Why is this needed: