Skip to content

Commit

Permalink
Tweak logging
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed May 10, 2024
1 parent c12a0f9 commit b3c8289
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions indexers/contacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"database/sql"
_ "embed"
"fmt"
"log/slog"
"time"

"github.com/pkg/errors"
Expand Down Expand Up @@ -211,14 +210,14 @@ func (i *ContactIndexer) indexModified(ctx context.Context, db *sql.DB, index st
lastModified = modifiedOn

if isActive {
slog.Debug("modified contact", "id", id, "modifiedOn", modifiedOn, "contact", contactJSON)
i.log().Debug("modified contact", "id", id, "modifiedOn", modifiedOn, "contact", contactJSON)

subBatch.WriteString(fmt.Sprintf(indexCommand, id, modifiedOn.UnixNano(), orgID))
subBatch.WriteString("\n")
subBatch.WriteString(contactJSON)
subBatch.WriteString("\n")
} else {
slog.Debug("deleted contact", "id", id, "modifiedOn", modifiedOn)
i.log().Debug("deleted contact", "id", id, "modifiedOn", modifiedOn)

subBatch.WriteString(fmt.Sprintf(deleteCommand, id, modifiedOn.UnixNano(), orgID))
subBatch.WriteString("\n")
Expand Down

0 comments on commit b3c8289

Please sign in to comment.