lychee
lychee copied to clipboard
Cache usage not logged
On cache expiry, a helpful message is print:
Cache is too old (age: 9days 23h 47m 11s 823ms 371us 801ns, max age: 8h). Discarding
✗ [404] https://*URL | Network error: Not Found
If cache is used, nothing shows up. I just realized that it probably works because I had an error cached and that popped up.
↻ [404] https://*URL | Error (cached)
I think some similar information would be very helpful there as well:
Cache is recent (age: 2h 47m 11s 823ms 371us 801ns, max age: 8h). Using
↻ [404] https://*URL | Error (cached)
it should be hidden by default but be turned on with -v or -vv flag.
@lebensterben is probably right.
it should be hidden by default but be turned on with -v or -vv flag.
Hmm. Considering that --verbose
/ -v
can print hundreds or thousands of lines below that single Cache is used
line we are talking about, I'm not so sure if it would be that useful at all then. It's easily buried by other information and not recognized.
What about a simple else
here? https://github.com/lycheeverse/lychee/blob/master/lychee-bin/src/main.rs#L179-L186
It looks like -vv
is not even documented? 🤔
@tooomm
When everything is working fine the program should not emit any noise except the simple status of success. That's why I think it should not report a good cache.
What about a simple else here? https://github.com/lycheeverse/lychee/blob/master/lychee-bin/src/main.rs#L179-L186
Kinda leaning towards what @lebensterben said: if it works as expected let's not make the output more verbose.
It looks like -vv is not even documented? 🤔
That's because it doesn't exist yet. 😆 We should add that and print the message.
Fixed with #824.