|
|
|
|
|
by jaryd
3940 days ago
|
|
Would be interested to hear from the devs about the actual reasons they chose to write unilog (https://github.com/stripe/unilog) instead of using multilog (which ships with Daemontools). Agreed that multilog is arcane and weird but what are the actual problems with it that unilog solves? |
|
This actually took a fair amount of digging! We've been using some version of unilog for over 4 years now (longer than I've been at Stripe), and we'd mostly forgotten why we switched. What follows is more the result of historical exploration and guesswork than authoritative statement of original truth.
I'm fairly confident that the impetus for unilog was timestamp prefixes for our log lines. We wanted timestamps (so that we weren't dependent on all applications adding them). multilog is capable of doing writing out timestamps, but it formats them with TAI64N. We wanted something more human-parseable.
Once we had it, we started adding other features. These days, I'd say the most useful thing unilog does for us is buffer log lines in memory. We would occasionally see disk writes on EC2 hang for long enough that the in-kernel (64k) pipe buffer would fill up and cause applications to stall.