Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce loglevels #685

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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