(apiSpec *spec.API, jobKey spec.JobKey)
| 150 | } |
| 151 | |
| 152 | func GetJobLoggerFromSpec(apiSpec *spec.API, jobKey spec.JobKey) (*zap.SugaredLogger, error) { |
| 153 | loggerCacheKey := fmt.Sprintf("apiName=%s,jobID=%s", jobKey.APIName, jobKey.ID) |
| 154 | logger := getFromCacheOrNil(loggerCacheKey) |
| 155 | if logger != nil { |
| 156 | return logger, nil |
| 157 | } |
| 158 | |
| 159 | return initializeLogger(loggerCacheKey, userconfig.InfoLogLevel, map[string]interface{}{ |
| 160 | "apiName": jobKey.APIName, |
| 161 | "apiKind": jobKey.Kind.String(), |
| 162 | "jobID": jobKey.ID, |
| 163 | }) |
| 164 | } |
nothing calls this directly
no test coverage detected