-
Notifications
You must be signed in to change notification settings - Fork 920
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
logging: add TRACE log level and move some DEBUG logging to it #7280
logging: add TRACE log level and move some DEBUG logging to it #7280
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK b7ea088
The CI is complaining, so the following diff should make happy
diff --git a/doc/schemas/lightning-getlog.json b/doc/schemas/lightning-getlog.json
index e179cfe75..018c14303 100644
--- a/doc/schemas/lightning-getlog.json
+++ b/doc/schemas/lightning-getlog.json
@@ -17,6 +17,7 @@
"unusual",
"info",
"debug",
+ "trace",
"io"
],
"description": [
@@ -69,6 +70,7 @@
"UNUSUAL",
"INFO",
"DEBUG",
+ "TRACE",
"IO_IN",
"IO_OUT"
]
@@ -111,7 +113,8 @@
"BROKEN",
"UNUSUAL",
"INFO",
- "DEBUG"
+ "DEBUG",
+ "TRACE"
]
}
}
bb47330
to
96d2fbc
Compare
6c2a855
to
c2fca61
Compare
By moving super-noisy debugging logging to new TRACE level we can make long-term logging at DEBUG possible w/o removing any logging. Addresses ([ElementsProject#7279]) Related Issues: ElementsProject#6927 chrisguida/smaug#34 ZmnSCPxj/clboss#194
These are very noisy at the debug level: DEBUG lightningd: Calling rpc_command hook of plugin clboss DEBUG lightningd: Plugin clboss returned from rpc_command hook call As seen in ZmnSCPxj/clboss#194
``` lightningd-test | 2024-04-26T13:07:01.581Z DEBUG 031c64a68e6d1b9e50711336d92b434c584ce668b2fae59ee688bd73713fee1569-gossipd: handle_recv_gossip: WIRE_CHANNEL_UPDATE lightningd-test | 2024-04-26T13:07:01.581Z DEBUG 031c64a68e6d1b9e50711336d92b434c584ce668b2fae59ee688bd73713fee1569-gossipd: handle_recv_gossip: WIRE_CHANNEL_UPDATE lightningd-test | 2024-04-26T13:07:01.582Z DEBUG 031c64a68e6d1b9e50711336d92b434c584ce668b2fae59ee688bd73713fee1569-gossipd: handle_recv_gossip: WIRE_CHANNEL_UPDATE ```
c2fca61
to
29f5026
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 29f5026
I like it because with the trace level we can remove a lot of bad information for the log, usually plugins are going to log in a verbose way, but in this way we can save some space on the disk :)
Nice catch for the drive by fix 😸 I learn a new thing with calloc
Can't push to your tree, but you're missing a Changelog-Added line, and docs in two places. See this:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changelog and doc updates needed
Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: Config: new log level `trace` where we moved the very noisiest `debug` logs.
DEBUG logging is very large, would be nice to reduce: #7279
This PR adds a new logging level
TRACE
betweenDEBUG
and theIO
levels and moves some examples of noisy logging to it.Implications:
TRACE
and get everything as in the pastDEBUG
for longer periods of time