Skip to content

Commit

Permalink
🐛 right log place
Browse files Browse the repository at this point in the history
  • Loading branch information
perebaj committed Jan 19, 2024
1 parent 290ccad commit f565dda
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 2 additions & 0 deletions cmd/newsletter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ func main() {
signalCh <- syscall.SIGTERM
}

slog.Info("connected successfully to MongoDB instance")

storage := mongodb.NewNLStorage(client, "newsletter")

err = storage.SaveEngineer(ctx, mongodb.Engineer{
Expand Down
3 changes: 0 additions & 3 deletions mongodb/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package mongodb
import (
"context"
"fmt"
"log/slog"

"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
Expand All @@ -21,8 +20,6 @@ func OpenDB(ctx context.Context, cfg Config) (*mongo.Client, error) {
return nil, fmt.Errorf("MongoDB URI is empty")
}

slog.Info("connected successfully to MongoDB instance")

bsonOpts := &options.BSONOptions{
UseJSONStructTags: true,
NilSliceAsEmpty: true,
Expand Down

0 comments on commit f565dda

Please sign in to comment.