Skip to content

Commit

Permalink
reduce loglevels
Browse files Browse the repository at this point in the history
Signed-off-by: Arne Rutjes <[email protected]>
  • Loading branch information
arner authored and mbrandenburger committed Sep 25, 2024
1 parent 2b88792 commit d8bd880
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 8 deletions.
2 changes: 1 addition & 1 deletion platform/fabric/core/generic/sig/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (o *Service) RegisterSigner(identity view.Identity, signer driver.Signer, v
s, ok := o.signers[idHash]
o.viewsSync.Unlock()
if ok {
logger.Warnf("another signer bound to [%s]:[%s][%s] from [%s]", identity, GetIdentifier(s), GetIdentifier(signer), string(s.DebugStack))
logger.Infof("another signer bound to [%s]:[%s][%s] from [%s]", identity, GetIdentifier(s), GetIdentifier(signer), string(s.DebugStack))
return nil
}
o.viewsSync.Lock()
Expand Down
2 changes: 1 addition & 1 deletion platform/view/core/sig/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (o *Service) RegisterSigner(identity view.Identity, signer driver.Signer, v
s, ok := o.signers[idHash]
o.viewsSync.Unlock()
if ok {
logger.Warnf("another signer bound to [%s]:[%s][%s] from [%s]", identity, GetIdentifier(s), GetIdentifier(signer), string(s.DebugStack))
logger.Infof("another signer bound to [%s]:[%s][%s] from [%s]", identity, GetIdentifier(s), GetIdentifier(signer), string(s.DebugStack))
return nil
}
o.viewsSync.Lock()
Expand Down
1 change: 0 additions & 1 deletion platform/view/services/comm/p2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ func (p *P2PNode) dispatchMessages(ctx context.Context) {
if logger.IsEnabledFor(zapcore.DebugLevel) {
logger.Debugf("pushing message to [%s], [%s]", internalSessionID, msg.message)
}
logger.Infof("Pushing method to Receive() for context [%s]", msg.message.ContextID)
session.incoming <- msg.message
case <-ctx.Done():
logger.Info("closing p2p comm...")
Expand Down
2 changes: 1 addition & 1 deletion platform/view/services/db/driver/sql/common/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (db *BasePersistence[V, R]) UpsertStateWithTx(tx *sql.Tx, ns driver2.Namesp
offset := len(keys) + 1
where, args := cond.ToString(&offset), cond.Params()
query := fmt.Sprintf("UPDATE %s SET %s WHERE %s", db.table, strings.Join(sets, ", "), where)
logger.Infof(query, args, len(values))
logger.Debug(query, args, len(values))

_, err := tx.Exec(query, append(values, args...)...)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion platform/view/services/db/driver/sql/common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func InitSchema(db *sql.DB, schemas ...string) (err error) {
}
}()
for _, schema := range schemas {
logger.Info(schema)
logger.Debug(schema)
if _, err = tx.Exec(schema); err != nil {
return errors2.Wrapf(err, "error creating schema: %s", schema)
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions platform/view/services/metrics/operations/fakes/logger.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions platform/view/services/metrics/operations/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (

type Logger interface {
Debugf(template string, args ...interface{})
Info(...interface{})
Warn(args ...interface{})
Warnf(template string, args ...interface{})
}
Expand Down Expand Up @@ -131,6 +132,8 @@ func (s *System) initializeMetricsProvider(provider metrics.Provider, m MetricsO
// '200':
// description: Ok.
s.Server.RegisterHandler("/metrics", promhttp.Handler(), m.TLS)
case "":
s.logger.Info("metrics disabled")
default:
s.logger.Warnf("Unknown provider type: %s; metrics disabled", m.Provider)
}
Expand Down

0 comments on commit d8bd880

Please sign in to comment.