Skip to content

Commit 5a32108

Browse files
authored
Make logging to MongoDB asynchronous (#64)
1 parent 924b316 commit 5a32108

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

logger/logger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func writeToMongo(level, message string) {
5656
return
5757
}
5858

59-
mongoCollection.InsertOne(context.TODO(), Log{
59+
go mongoCollection.InsertOne(context.TODO(), Log{
6060
CreatedAt: time.Now(),
6161
Level: level,
6262
Message: message,

0 commit comments

Comments
 (0)