emichael / dslabs

Distributed Systems Labs and Framework
https://ellismichael.com/dslabs/
1.26k stars 341 forks source link

Add a demo of @Log to Lab 0 #70

Open wilcoxjay opened 9 months ago

wilcoxjay commented 9 months ago

It would be nice to introduce students to proper logging infrastructure using @Log. I think the best place for this would be a short writeup as part of Lab 0, that we probably wouldn't cover explicitly in week 1 (because student heads are already full) but we can point back to later while students are working on Lab 2 ish. Generally, student log messages should be at level FINE or above.

The writeup should also include a description of why logging is better than println. The main reason being that they are off by default (when properly leveled), and in particular they are off when run in gradescope. (Every quarter we have a handful of students submit solutions that call println in every event, generating gigabytes of log data. Our gradescope script parses the log, and it will choke if the log does not fit in memory (which on Gradescope is a couple of gigs at most).)