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

[Improvement] CPU intensive Logging Framework #1637

Open
Nauman-S opened this issue Jan 16, 2025 · 0 comments
Open

[Improvement] CPU intensive Logging Framework #1637

Nauman-S opened this issue Jan 16, 2025 · 0 comments
Labels
question Further information is requested

Comments

@Nauman-S
Copy link
Collaborator

Nauman-S commented Jan 16, 2025

Maybe a possible logging framework issue?

https://github.com/0xPolygonHermez/cdk-erigon/blob/zkevm/turbo/logging/logging.go uses

import "github.com/ledgerwatch/log/v3" see source

func (l *logger) write(msg string, lvl Lvl, ctx []interface{}) {
	l.h.Log(&Record{
		Time: time.Now(),
		Lvl:  lvl,
		Msg:  msg,
		Ctx:  newContext(l.ctx, ctx),
		Call: stack.Caller(2),
		KeyNames: RecordKeyNames{
			Time: timeKey,
			Msg:  msgKey,
			Lvl:  lvlKey,
		},
	})
}

Screenshot 2025-01-16 at 5 20 36 PM

Seems it is cpu intensive to synchronously create records with Caller information?

@Nauman-S Nauman-S added the question Further information is requested label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant