(apiSpec *spec.API)
| 122 | } |
| 123 | |
| 124 | func GetRealtimeAPILoggerFromSpec(apiSpec *spec.API) (*zap.SugaredLogger, error) { |
| 125 | loggerCacheKey := fmt.Sprintf("apiName=%s,apiID=%s", apiSpec.Name, apiSpec.ID) |
| 126 | logger := getFromCacheOrNil(loggerCacheKey) |
| 127 | if logger != nil { |
| 128 | return logger, nil |
| 129 | } |
| 130 | |
| 131 | return initializeLogger(loggerCacheKey, userconfig.InfoLogLevel, map[string]interface{}{ |
| 132 | "apiName": apiSpec.Name, |
| 133 | "apiKind": apiSpec.Kind.String(), |
| 134 | "apiID": apiSpec.ID, |
| 135 | }) |
| 136 | } |
| 137 | |
| 138 | func GetJobLogger(jobKey spec.JobKey) (*zap.SugaredLogger, error) { |
| 139 | loggerCacheKey := fmt.Sprintf("apiName=%s,jobID=%s", jobKey.APIName, jobKey.ID) |
nothing calls this directly
no test coverage detected