3 ms·
If you don't flush every line, you'll lose lines in a crash. You often need those lines when trying to debug such a problem, so that's the worst possible time t
by dhh 14y ago
If you don't flush every line, you'll lose lines in a crash. You often need those lines when trying to debug such a problem, so that's the worst possible time to lose said lines.
We added tagged logging to deal with the "not in order" problem. Find the process id of the request you're trying to follow, grep for that.
Both problems solved.
- davidw 14y agoPerhaps it's a stupid question, but... if something's catching a crash and logging it, can't the same something ensure that everything is written to disk?
- justinjlynn 14y agoYou can't catch every crash every time. Add to that the fact that the crashes from which you can't recover are the ones you most want to catch the fact that you really do need to just get those logs persisted as soon as you receive them becomes rather apparent.
- IsTom 14y agoDepending on your stack and your needs this might be true, but my experience is that if you're not segfaulting it's not much of a problem. Also systems can be tuned so that flush happens when process dies.