Fix log message formatting
One log message uses Debug
instead of Debugf
, which results in log messages looking like this:
{"level":"debug","time":"2022-06-03T22:20:00.078Z","msg":"Found %d workloads to scan8","mod_name":"starboard_vulnerability"}
This has been fixed by switching to Debugf
and the other has a blank k8s_uid
field, because we are no longer reading reports from a kubernetes resource:
{"level":"info","time":"2022-06-02T23:05:17.991Z","msg":"Creating vulnerabilities in GitLab","mod_name":"starboard_vulnerability","report_name":"replicaset-review-hfyngvason-81aepr-589755b9cf-auto-deploy-app","k8s_uid":"","vulnerabilities_count":105}
{"level":"info","time":"2022-06-02T23:05:24.990Z","msg":"Creating vulnerabilities in GitLab","mod_name":"starboard_vulnerability","report_name":"replicaset-production-d745cddd-auto-deploy-app","k8s_uid":"","vulnerabilities_count":105}
{"level":"info","time":"2022-06-02T23:05:31.374Z","msg":"Creating vulnerabilities in GitLab","mod_name":"starboard_vulnerability","report_name":"statefulset-production-postgresql-production-postgresql","k8s_uid":"","vulnerabilities_count":386}
{"level":"info","time":"2022-06-02T23:05:46.098Z","msg":"Resolving no longer detected vulnerabilities in GitLab","mod_name":"starboard_vulnerability","report_name":"replicaset-review-hfyngvason-81aepr-589755b9cf-auto-deploy-app","k8s_uid":""}
{"level":"info","time":"2022-06-02T23:05:46.169Z","msg":"Creating vulnerabilities in GitLab","mod_name":"starboard_vulnerability","report_name":"replicaset-production-6757f4f5cd-auto-deploy-app","k8s_uid":"","vulnerabilities_count":375}
{"level":"info","time":"2022-06-02T23:05:54.411Z","msg":"Creating vulnerabilities in GitLab","mod_name":"starboard_vulnerability","report_name":"replicaset-production-ccf5456c7-auto-deploy-app","k8s_uid":"","vulnerabilities_count":375}
{"level":"info","time":"2022-06-02T23:05:56.888Z","msg":"Resolving no longer detected vulnerabilities in GitLab","mod_name":"starboard_vulnerability","report_name":"replicaset-production-d745cddd-auto-deploy-app","k8s_uid":""}
{"level":"info","time":"2022-06-02T23:07:58.294Z","msg":"Resolving no longer detected vulnerabilities in GitLab","mod_name":"starboard_vulnerability","report_name":"statefulset-production-postgresql-production-postgresql","k8s_uid":""}
{"level":"info","time":"2022-06-02T23:08:08.985Z","msg":"Resolving no longer detected vulnerabilities in GitLab","mod_name":"starboard_vulnerability","report_name":"replicaset-production-6757f4f5cd-auto-deploy-app","k8s_uid":""}
{"level":"info","time":"2022-06-02T23:08:15.341Z","msg":"Resolving no longer detected vulnerabilities in GitLab","mod_name":"starboard_vulnerability","report_name":"replicaset-production-ccf5456c7-auto-deploy-app","k8s_uid":""}
This has been fixed by removing the k8s_uid
log field.
Edited by Brian Williams