Skip to content

Commit d07d63e

Browse files
aduffeckbutonic
authored andcommitted
Do not log nodes (cs3org#2463)
* Do not log whole nodes It turns out that logging whole node objects is very expensive and also spams the logs quite a bit. Instead we just log the node ID now. * Add changelog
1 parent c68b5cd commit d07d63e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Enhancement: do not log whole nodes
2+
3+
It turns out that logging whole node objects is very expensive and also
4+
spams the logs quite a bit. Instead we just log the node ID now.
5+
6+
https://github.com/cs3org/reva/pull/2463

pkg/storage/utils/decomposedfs/node/node.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ func (n *Node) SetFavorite(uid *userpb.UserId, val string) error {
506506

507507
// AsResourceInfo return the node as CS3 ResourceInfo
508508
func (n *Node) AsResourceInfo(ctx context.Context, rp *provider.ResourcePermissions, mdKeys []string, returnBasename bool) (ri *provider.ResourceInfo, err error) {
509-
sublog := appctx.GetLogger(ctx).With().Interface("node", n).Logger()
509+
sublog := appctx.GetLogger(ctx).With().Interface("node", n.ID).Logger()
510510

511511
var fn string
512512
nodePath := n.InternalPath()

0 commit comments

Comments
 (0)