Skip to content

Commit

Permalink
refactor: http logger option
Browse files Browse the repository at this point in the history
  • Loading branch information
teodora-sandu committed Apr 18, 2024
1 parent 584bc26 commit 9ae2ace
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func WithErrorReporter(errorReporter observability.ErrorReporter) OptionFunc {
func WithLogger(logger *zerolog.Logger) OptionFunc {
return func(h *httpClient) {
h.logger = logger
h.errorReporter = observability.NewErrorReporter(logger)
}
}

Expand Down
2 changes: 1 addition & 1 deletion internal/analysis/analysis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func TestAnalysis_CreateWorkspace_KnownErrors(t *testing.T) {

logger := zerolog.Nop()

analysisOrchestrator := analysis.NewAnalysisOrchestrator(&logger, mockHTTPClient, mockInstrumentor, mockErrorReporter, mockConfig)
analysisOrchestrator := analysis.NewAnalysisOrchestrator(mockConfig, &logger, mockHTTPClient, mockInstrumentor, mockErrorReporter)
_, err := analysisOrchestrator.CreateWorkspace(
context.Background(),
"4a72d1db-b465-4764-99e1-ecedad03b06a",
Expand Down

0 comments on commit 9ae2ace

Please sign in to comment.