I tend to find that after I build an application, the logs emitted by it become near useless and completely unparseable, and has the problem of being really verbose, while not outputting important stuff. Example:
Apr 9 21:49:58.648 [ DEBUG] - Read configuration successfully
Apr 9 21:49:58.649 [ INFO] - Kirisurf started
[{nqzosnpdzvgr5umswrnmidd3n56zipl3 54.238.54.12:2380 200 [1 2 3] true} {wq7q5idgpkopb5vbh4qmhpne42so4uue 129.97.134.129:12345 200 [0 2 3] true} {3szie5c2keiqpubsktanxlf6$
xifwi76 203.178.133.11:12345 200 [1 0 3] true} {wmxp2o6q2z5rm5rwprnry33lbwt4ikrn 133.68.253.242:12345 200 [0 1 2] true}]
Apr 9 21:49:58.985 [ ALERT] - Enfreshen!
Apr 9 21:49:58.985 [ ALERT] - Freshened!
Apr 9 21:49:58.985 [ ALERT] - Enfreshen!
Apr 9 21:49:58.985 [ ALERT] - Enfreshen!
Apr 9 21:49:58.985 [ DEBUG] - Into buildings sc
Wtfwtf
Wtfwtf
Wtfwtf
Apr 9 21:49:58.985 [ ALERT] - Enfreshen!
Apr 9 21:49:58.985 [ ALERT] - Enfreshen!
Apr 9 21:49:58.985 [ DEBUG] - Into buildings sc
Wtfwtf
Wtfwtf
Apr 9 21:49:58.985 [ DEBUG] - [{wmxp2o6q2z5rm5rwprnry33lbwt4ikrn 133.68.253.242:12345 200 [0 1 2] true} {wq7q5idgpkopb5vbh4qmhpne42so4uue 129.97.134.129:12345 200 [0
2 3] true} {nqzosnpdzvgr5umswrnmidd3n56zipl3 54.238.54.12:2380 200 [1 2 3] true}]
Wtfwtf
Apr 9 21:49:58.985 [ DEBUG] - Into buildings sc
Wtfwtf
Wtfwtf
For example, nobody will ever know what Wtfwtf
means. In fact, it was just a debug printf statement I threw in to see whether a certain part of the code got stuck. The huge strings of public keys don't have descriptions of what they are. In fact, they are dumps of a circuit state datastructure. Nobody will ever know what the references to freshness are. Nobody will ever know that sc
stands for "subcircuit", which is a jargon term nobody except me uses.
However, I really can't think of any way to clean this up. I could of course use more specific terminology and remove the wtfwtf, but looking at the logging output still doesn't tell you anything about what the program is doing (namely, finding a path in a graph of network nodes, and establishing a route through them).
I also have the problem of debugging. If I remove these ugly logging statements things may become difficult to debug. What's the tradeoff? Of course I use the debug logging level, but I don't want to pollute it so much that it becomes useless for debugging, filling with junk from known not buggy code.