Skip to content

Commit 7e97fbb

Browse files
committed
Remove new lines in log lines.
1 parent cc6ea8e commit 7e97fbb

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

internal/client/transaction.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func withRetryOnTooManyRequests(fn func() error, backoffFactor float64, maxRetri
6464
if err != nil {
6565
logrus.Error(err)
6666
backoffTime := time.Duration(int(math.Pow(backoffFactor, float64(trials)))) * delay
67-
logrus.Info("Sleeping for %f seconds\n", backoffTime/time.Second)
67+
logrus.Info("Sleeping for %f seconds", backoffTime/time.Second)
6868
time.Sleep(backoffTime)
6969
} else {
7070
return nil
@@ -105,7 +105,7 @@ func (cgt *Transaction) Commit() error {
105105

106106
chunkSize := cgt.chunkSize
107107

108-
logrus.Debug("Assets to be inserted=%d removed=%d, Relations to be inserted=%d removed=%d\n",
108+
logrus.Debugf("Assets to be inserted=%d removed=%d, Relations to be inserted=%d removed=%d",
109109
len(bulk.GetAssetUpserts()), len(bulk.GetAssetRemovals()),
110110
len(bulk.GetRelationUpserts()), len(bulk.GetRelationRemovals()))
111111

internal/database/mariadb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ func (m *MariaDB) ReadGraph(ctx context.Context, sourceName string, graph *knowl
483483
}
484484

485485
elapsed := time.Since(now)
486-
logrus.Debugf("Read graph of data source with name %s in %fs\n", sourceName, elapsed.Seconds())
486+
logrus.Debugf("Read graph of data source with name %s in %fs", sourceName, elapsed.Seconds())
487487
return nil
488488
}
489489

internal/knowledge/querier.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (q *Querier) queryInternal(ctx context.Context, cypherQuery string) (*Queri
7070
return nil, translation.Query, err
7171
}
7272

73-
logrus.Debugf("Found results in %dms\n", s.Execution/time.Millisecond)
73+
logrus.Debugf("Found results in %dms", s.Execution/time.Millisecond)
7474

7575
result := &QuerierResult{
7676
Cursor: res.Cursor,

internal/server/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,11 @@ func StartServer(listenInterface string,
230230

231231
var err error
232232
if viper.GetString("server_tls_cert") != "" {
233-
logrus.Infof("Listening on %s with TLS enabled, the connection is secure [concurrency=%d]\n", listenInterface, concurrency)
233+
logrus.Infof("Listening on %s with TLS enabled, the connection is secure [concurrency=%d", listenInterface, concurrency)
234234
err = http.ListenAndServeTLS(listenInterface, viper.GetString("server_tls_cert"),
235235
viper.GetString("server_tls_key"), r)
236236
} else {
237-
logrus.Warnf("Listening on %s with TLS disabled. Use `server_tls_cert` option to setup a certificate [concurrency=%d]\n",
237+
logrus.Warnf("Listening on %s with TLS disabled. Use `server_tls_cert` option to setup a certificate [concurrency=%d]",
238238
listenInterface, concurrency)
239239
err = http.ListenAndServe(listenInterface, r)
240240
}

internal/utils/httpclient.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (hc *HTTPClient) doFromCache(req *http.Request) (*http.Response, error) {
6060
url = strings.ReplaceAll(url, ":", "_")
6161
cacheFile := path.Join(hc.CacheDir, url)
6262
if _, err := os.Stat(cacheFile); os.IsNotExist(err) {
63-
logrus.Debugf("Caching HTTP response of %s\n", req.URL.String())
63+
logrus.Debugf("Caching HTTP response of %s", req.URL.String())
6464
res, err := hc.Client.Do(req)
6565
if err != nil {
6666
return nil, err
@@ -89,7 +89,7 @@ func (hc *HTTPClient) doFromCache(req *http.Request) (*http.Response, error) {
8989
return res, nil
9090
}
9191

92-
logrus.Debugf("Using HTTP cache for %s\n", req.URL.String())
92+
logrus.Debugf("Using HTTP cache for %s", req.URL.String())
9393
f, err := os.Open(cacheFile)
9494
if err != nil {
9595
return nil, err

0 commit comments

Comments
 (0)