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

Logging: allow to setup default log output in global #277

Merged
merged 1 commit into from
Oct 29, 2023

Conversation

jkellerer
Copy link
Collaborator

Fixes #261

Adds a new option to define the default log output in global:

global:
  log: 'some-destination'

Adds a new destination syntax - for the case that:

  • global redirects to a file
  • you want to redirect to console or stdout instead (- means "console or stdout")

@codecov
Copy link

codecov bot commented Oct 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (63f8faf) 77.42% compared to head (f6547d0) 77.48%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #277      +/-   ##
==========================================
+ Coverage   77.42%   77.48%   +0.06%     
==========================================
  Files          97       97              
  Lines       10284    10283       -1     
==========================================
+ Hits         7962     7967       +5     
+ Misses       2043     2037       -6     
  Partials      279      279              
Flag Coverage Δ
unittests 77.48% <ø> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
commands_display.go 40.45% <ø> (+0.76%) ⬆️
config/global.go 86.36% <ø> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@creativeprojects creativeprojects left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me, thanks 👍🏻

I tried windows elevation and the logs are going through fine 😛

That was also one of the last bits missing for the run-schedule command, cool 😎

@jkellerer jkellerer added this to the v0.25.0 milestone Oct 29, 2023
@jkellerer jkellerer added the enhancement New feature or request label Oct 29, 2023
@jkellerer jkellerer merged commit 1b3292c into creativeprojects:master Oct 29, 2023
9 checks passed
@jkellerer jkellerer deleted the ft/global-log branch October 29, 2023 20:07
@creativeprojects
Copy link
Owner

I was thinking... at some point we might want to distinguish regular commands and interactive commands like self-update because it doesn't make much sense to send the output somewhere else than the console 😐

@jkellerer
Copy link
Collaborator Author

Yes. Though these commands might still use log as is but output the important information to stdout / console instead of using log (which is mostly the case already, might just need a review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to set resticprofile --log in config file
2 participants