Add log/gist-log commands
It will be very useful to have command that just opens chocolatey.log It may be very boring to rerun installer with -v/-vd or to copy-past log file location from shell window, as it is very hard to not select surrounding brackets.
Another useful command may be gist-log inspired by brew gist-logs "formula name", e.g. upload log of package install to gist.
Hi, The task has a low priority and has been waiting for 6 years - I'm newbie so it is not critical and I can try my hand at it. I have two commands in my head:
choco log - which will open chocolatey.log file
choco log -o / choco log --output - which will display chocolatey.log content in console.
What do you think?
Those sound reasonable to me.
A few things to think about:
- Are we attempting to directly launch
chocolatey.log(akin toInvoke-Item chocolatey.login PowerShell)? If we're doing that, what happens if they don't have a handler for.logfiles? Will it fail? If it fails do we fallback on launchingnotepad.exe chocolatey.log? - For
--outputdo we default to outputting the entire (up to 10MB) file? Or do we limit it to X lines? If we limit it to X lines, that should be both a configuration option and a parameter that you can pass in. - In the case where we're outputting to the console, what happens with the logging for the current run of Chocolatey? It would seem best to not output that stuff, but I'm not sure right now how we'd prevent that, and perhaps we just need to ensure it's not logging while it's reading/outputting 🤔
These are just things that come to mind when I look at this issue and think about some of the possible scenarios you might want to consider as you start working on the command.