Add structured logger (#54) (#1467)

This is two changes:

Replacing all usages of SimpleLogger with it's interface SimpleLogging which makes it easier to swap out loggers going forward
Nukes SimpleLogger in favor of StructuredLogger which allows us to better analyze logs in our log management system we choose.
This commit is contained in:
Nish Krishnan
2021-04-06 12:02:25 -07:00
committed by GitHub
parent 13fba40827
commit 7ac8106f8a
83 changed files with 931 additions and 642 deletions

View File

@@ -29,6 +29,7 @@ import (
"github.com/runatlantis/atlantis/server"
"github.com/runatlantis/atlantis/server/events/locking/mocks"
"github.com/runatlantis/atlantis/server/events/models"
"github.com/runatlantis/atlantis/server/logging"
sMocks "github.com/runatlantis/atlantis/server/mocks"
. "github.com/runatlantis/atlantis/testing"
)
@@ -106,6 +107,7 @@ func TestIndex_Success(t *testing.T) {
Router: r,
AtlantisVersion: atlantisVersion,
AtlantisURL: u,
Logger: logging.NewNoopLogger(t),
}
req, _ := http.NewRequest("GET", "", bytes.NewBuffer(nil))
w := httptest.NewRecorder()