-
Notifications
You must be signed in to change notification settings - Fork 80
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
Too rapid geth.log
file growth
#16511
Comments
Logs from `messenger_mailserver` occupy 40 out of 100MB of data in my `geth.log`. Instead of extending `logger` with many parameters, such as `chatIDs`, `topic`, etc., the hash of those parameters is calucalted and kept as a context. iterates: #5889
Most of the log size is coming from CC: @richard-ramos |
I've done more grepping, the results:
|
:1310 - Seems useful for debugging logger.Info("received waku2 store message",
zap.Stringer("envelopeHash", envelope.Hash()),
zap.String("pubsubTopic", query.PubsubTopic),
zap.Int64p("timestamp", envelope.Message().Timestamp), :1543 - This seems useful for debugging too logger := w.logger.With(
zap.Any("messageType", msgType),
zap.Stringer("envelopeHash", envelope.Hash()),
zap.String("contentTopic", envelope.Message().ContentTopic),
zap.Int64("timestamp", envelope.Message().GetTimestamp()),
)
logger.Debug("received new envelope") :1438 - We can probably eliminate this one, as it is not really useful to log that w.logger.Debug("peer stats",
zap.Int("peersCount", len(latestConnStatus.Peers)),
zap.Any("stats", latestConnStatus)) :1584 - These can be probably eliminated (they're all part of waku.add) logger := w.logger.With(zap.String("envelopeHash", recvMessage.Hash().Hex()))
...
logger.Debug("w envelope already cached")
...
logger.Debug("cached w envelope")
...
logger.Debug("immediately processing envelope")
...
logger.Debug("posting event") I think we can get rid of some of these bugs, but the first two are kind of useful when debugging whether a message is received or not. I wonder if we can add some other level like |
Seems like it should be possible? Wdyt, @osmaczko @igor-sirotin |
I like the idea of Trace level in general 👍 (but we should be careful even with that one) |
We discussed the trace level in one of the meetings. The conclusion was that with the trace level, we could end up having the same problem, so it is better to implement categorized logging configurable at runtime. Examples of potential categories include "wallet," "waku," "messenger," "communities," etc. I believe it would be best to combine both, to be honest. |
Logs from `messenger_mailserver` occupy 40 out of 100MB of data in my `geth.log`. Instead of extending `logger` with many parameters, such as `chatIDs`, `topic`, etc., the hash of those parameters is calucalted and kept as a context. iterates: #5889
Logs from `messenger_mailserver` occupy 40 out of 100MB of data in my `geth.log`. Instead of extending `logger` with many parameters, such as `chatIDs`, `topic`, etc., the hash of those parameters is calucalted and kept as a context. iterates: #5889
Note to myself: historical reasons of why we use |
This ensures waku node logs remain at INFO level, even if the global logging level is set lower (e.g. DEBUG). To enable waku logs at a specific level, one can execute: `wakuext_setLogNamespaces([{"logNamespaces": "wakunode:debug"}])`. iterates: status-im/status-desktop#16511
This ensures waku node logs remain at INFO level, even if the global logging level is set lower (e.g. DEBUG). To enable waku logs at a specific level, one can execute: `wakuext_setLogNamespaces([{"logNamespaces": "wakunode:debug"}])`. iterates: status-im/status-desktop#16511
Waiting for status-im/status-mobile#21758 to merge the last missing piece status-im/status-go#6164. |
This ensures waku node logs remain at INFO level, even if the global logging level is set lower (e.g. DEBUG). To enable waku logs at a specific level, one can execute: `wakuext_setLogNamespaces([{"logNamespaces": "wakunode:debug"}])`. iterates: status-im/status-desktop#16511
Problem
The general problem is that the
geth.log
file grows too rapidly, especially when the debug log level is enabled. The defaultgeth.log
rotation strategy in status-desktop is to maintain a singlegeth.log
file with a size limit of 100MB, then overwrite it when the next output file reaches the same limit:For my main Status account with the debug log level enabled, it takes approximately 6 minutes for the rotation, which is far too quick.
status-go version: 74ae41154
Future Steps
go-waku
logsdebug
level logs totrace
levelThe text was updated successfully, but these errors were encountered: