Skip to content

Commit 02f285a

Browse files
AlteredCoderjdv
authored andcommitted
remove log debug
1 parent 6e95416 commit 02f285a

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

pkg/database/database.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type Client struct {
1313

1414
func NewClient(sqliteDBPath string) (*Client, error) {
1515
client := &Client{}
16-
db, err := gorm.Open(sqlite.Open(sqliteDBPath), &gorm.Config{Logger: logger.Default.LogMode(logger.Info)})
16+
db, err := gorm.Open(sqlite.Open(sqliteDBPath), &gorm.Config{Logger: logger.Default.LogMode(logger.Silent)})
1717
if err != nil {
1818
return client, err
1919
}

pkg/database/report.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ func (r *ReportClient) FindById(reportID uint) (*Report, error) {
7474
return nil, result.Error
7575
}
7676

77-
// Load IPs using Association API
7877
err := r.db.Model(&report).Association("IPs").Find(&report.IPs)
7978
if err != nil {
8079
return nil, err
@@ -99,7 +98,6 @@ func (r *ReportClient) FindByHash(filepath string) (*Report, error) {
9998
return nil, result.Error
10099
}
101100

102-
// Load IPs using Association API
103101
err = r.db.Model(&report).Association("IPs").Find(&report.IPs)
104102
if err != nil {
105103
return nil, err
@@ -193,7 +191,6 @@ func (r *ReportClient) FilePathExist(filePath string) (*Report, bool, error) {
193191
return nil, false, nil
194192
}
195193

196-
// Load IPs using Association API
197194
err := r.db.Model(&reports[0]).Association("IPs").Find(&reports[0].IPs)
198195
if err != nil {
199196
return nil, false, err

0 commit comments

Comments
 (0)