ethereum / aleth

Aleth – Ethereum C++ client, tools and libraries
GNU General Public License v3.0
3.97k stars 2.17k forks source link

Tune aleth-bootnode default log level #5499

Open halfalicious opened 5 years ago

halfalicious commented 5 years ago

@chfast: I'm thinking of setting the default logging for aleth-bootnode to level 4 (debug) and enabling the discov channel. This would result in the following output:

DEBUG 03-03 20:16:51 p2p  discov Pong from ##52096a15…@23.111.173.226:30304
DEBUG 03-03 20:16:51 p2p  discov Active node 52096a15e3ee48268de435fe2124a559c80bbec0ff177e34d7360d008c6217069db56b68b7458194bb5e3cb613090a3838a788622722f18024f6490c0fb4e8f3@23.111.173.226:30304
DEBUG 03-03 20:16:51 p2p  discov Evicting node 090057509cbc68210e0051c3d662cc71049fd1177080c46898e5b10557579b81a7629c9f33b113237d2116c9ded0ef0ef9eb9259657e7ececee94e4d16e37833@20.184.15.116:38711
DEBUG 03-03 20:16:51 p2p  discov Ignoring request to ping 090057509cbc68210e0051c3d662cc71049fd1177080c46898e5b10557579b81a7629c9f33b113237d2116c9ded0ef0ef9eb9259657e7ececee94e4d16e37833@20.184.15.116:38711, because it's already pinged
DEBUG 03-03 20:16:51 p2p  discov Pong from ##56e7b1e3…@34.73.188.196:30303
DEBUG 03-03 20:16:51 p2p  discov Active node 56e7b1e3e65cb59809d166e4b992e3b16884b0538ea3003db66e63c3b7251b5aa63bfcacdd28c8bc02a323369789309a71a99c7c68d0dbc939f446d6ee3a7427@34.73.188.196:30303
DEBUG 03-03 20:16:51 p2p  discov Evicting node 090057509cbc68210e0051c3d662cc71049fd1177080c46898e5b10557579b81a7629c9f33b113237d2116c9ded0ef0ef9eb9259657e7ececee94e4d16e37833@20.184.15.116:38711
DEBUG 03-03 20:16:51 p2p  discov Ignoring request to ping 090057509cbc68210e0051c3d662cc71049fd1177080c46898e5b10557579b81a7629c9f33b113237d2116c9ded0ef0ef9eb9259657e7ececee94e4d16e37833@20.184.15.116:38711, because it's already pinged
DEBUG 03-03 20:16:51 p2p  discov Pong from ##01b87e71…@80.211.179.187:30305
DEBUG 03-03 20:16:51 p2p  discov Active node 01b87e7159e0c13f401cbb371bcf4791a5175d9f7740833e003bdea9fb18f89d06ec03c9abc46f27e463528f0bfb2bb16da76d6ca02d92085c7254632085173f@80.211.179.187:30305
DEBUG 03-03 20:16:51 p2p  discov Evicting node 090057509cbc68210e0051c3d662cc71049fd1177080c46898e5b10557579b81a7629c9f33b113237d2116c9ded0ef0ef9eb9259657e7ececee94e4d16e37833@20.184.15.116:38711
DEBUG 03-03 20:16:51 p2p  discov Ignoring request to ping 090057509cbc68210e0051c3d662cc71049fd1177080c46898e5b10557579b81a7629c9f33b113237d2116c9ded0ef0ef9eb9259657e7ececee94e4d16e37833@20.184.15.116:38711, because it's already pinged

Thoughts? I don't like the idea of having debug log messages being output by default but I think in the aleth-bootnode case the info they provide is valuable and therefore should be output by default.

gumb0 commented 5 years ago

Well it's less optimal than what @chfast suggested - changing some log messages in discovery to INFO, so that there'll be both INFO and DEBUG messages. Then disabling discov INFO in aleth by default.