story of a failure
John Arbash Meinel
john at arbash-meinel.com
Mon Apr 29 18:58:42 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
...
> - you'd probably want to buffer *all* messages like this,
> otherwise you get out of order log messages which seems like it
> would be a pain. If you buffer all messages, you'd need to decide
> when to flush the log, which in a situation with hundreds or
> thousands of outstanding requests, is not going to be easy.
>
> - errors might not be that infrequent. If you're not careful, you
> may end up saving just as much data as without the ring buffer.
>
I think you're over thinking it a bit.
You write a log file of all messages above INFO/NOTICE.
You keep in the ring buffer all messages including DEBUG/INFO/NOTICE/etc.
When you get a significant error, you write out an error start header,
all messages in the buffer (this will lead to some duplicate high
level messages).
> - it seems arbitrary - how many log messages do you save in the
> ring buffer? In my experience, some failures can take a long time
> to happen - there may be 5 minutes or 30 minutes or a day between
> the start of the request and its final result, and in that time the
> ring buffer may well have wrapped many times.
If they are significant events, they will be caught by the default
logging. If they are not, it is *very* unlikely that 1-day of logging
at DEBUG level is going to not overwhelm you in detail anyway. (And
you can enable that if you really want it via config and a restart.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlF+wuIACgkQJdeBCYSNAAMCcgCgyn3cGGx5z+lGUO70cBUUmhFn
jTYAn2wnqLDF2OKvR45s998T2caRWjHd
=kPHv
-----END PGP SIGNATURE-----
More information about the Juju-dev
mailing list