certspotter icon indicating copy to clipboard operation
certspotter copied to clipboard

Store log errors in state directory

Open AGWA opened this issue 7 months ago • 2 comments

Instead of writing log errors to stderr, write them to a file in the state directory. When reporting a health check failure, include the path to the file and the last several lines.

See #104 for background.

AGWA avatar May 19 '25 17:05 AGWA

To keep things simple, I think they could be kept in a looping buffer (of size: several) in memory as well. If we're talking about the HTTP errors, maybe per CT log. Storing them separately on disk will need truncating sooner or later.

schildbach avatar May 21 '25 14:05 schildbach

There will be one error file per CT log. The health check seems like a logical time to rotate/truncate the file.

AGWA avatar Jun 13 '25 17:06 AGWA