Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve information-level output logging #357

Open
splatteredbits opened this issue Feb 5, 2021 · 0 comments
Open

Improve information-level output logging #357

splatteredbits opened this issue Feb 5, 2021 · 0 comments

Comments

@splatteredbits
Copy link
Member

Some tasks don't implement any logging, so it is hard to see if/when/what a build is doing without verbose logging turned on. Update Invoke-WhiskeyTask to log when a task starts and finishes. The output should look like:

[00:00:20.73]  [GetPowerShellModule]
[00:00:20.73]  [GetPowerShellModule]  Installing PowerShell module BuildMasterAutomation 0.5.0 to .\PSModules.
[00:00:20.73]  [GetPowerShellModule]  Completed in 00:00:05.92.

If possible, it would be nice if future logging statements from a task didn't have the task name prefix and were indented four characters:

[00:00:20.73]  [GetPowerShellModule]
[00:00:20.73]      Installing PowerShell module BuildMasterAutomation 0.5.0 to .\PSModules.
[00:00:20.73]  [GetPowerShellModule]  Completed in 00:00:05.92.

If a task failed, replace "Completed" with "Failed".

Also, change the timespan prefix to only use minutes and seconds, not hours or milliseconds and default to two digit, non-leading zero hours:

[   20s]  [GetPowerShellModule]
[   20s]      Installing PowerShell module BuildMasterAutomation 0.5.0 to .\PSModules.
[   20s]  [GetPowerShellModule]  Completed in 5s.
[ 5m32s]  [ATask]
[15m51s]  [ATask]  Completed in 10m29s
@splatteredbits splatteredbits changed the title Log at information level when a task starts and ends Improve information-level output logging Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant