choco icon indicating copy to clipboard operation
choco copied to clipboard

Logging: Rotate logs

Open DarwinJS opened this issue 9 years ago • 6 comments

Couldn't find that there is a way to do this or an existing issue. Super low priority.

Right before I run a troubled package with -dv I would like to rotate the logs with "choco logs rotate" (or whatever you think the command should be) so that my log set is clean when doing RCA.

DarwinJS avatar Oct 04 '16 18:10 DarwinJS

Thanks!

ferventcoder avatar Oct 04 '16 20:10 ferventcoder

I'd like to second this idea. Having a way to globally rotate the choco logs (every x days or something) but also having the ability to manually perform this at command prompt would be nice as well.

linuxprox avatar Jan 25 '17 21:01 linuxprox

Added to the list for not 0.10.4, but 0.10.5. This could be pretty easy but I didn't want to shift the release date.

ferventcoder avatar Jan 25 '17 21:01 ferventcoder

Can we also have something to get rid of older logs with that command?

grafik

stumbaumr avatar Dec 16 '21 15:12 stumbaumr

@stumbaumr there is a unofficial tool that can cleanup old logs (and other things) called choco-cleaner: https://community.chocolatey.org/packages/choco-cleaner

TheCakeIsNaOH avatar Dec 16 '21 16:12 TheCakeIsNaOH

Thinking about how to implement this;

It seems like the best option might be to have this be a task, like the RemovePendingPackagesTask. That way, it will run before every choco command. And then add a config option for how many logs to keep.

TheCakeIsNaOH avatar Dec 16 '21 17:12 TheCakeIsNaOH