-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add sane defaults for logfile names #36
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
moseshll
reviewed
Jul 24, 2023
moseshll
approved these changes
Jul 24, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like everything about this. (Except the fact that the GitHub test action seems to be stalled.)
Examples: cictl index today --log today cictl index full --log full cictl index today --log something_different.log (will go to <logdir>/something_different.log) A few changes: * new module `CICTL::LogfileDefaults` that defines date_named_file templates and default values for daily/full index logs * logfile_directory is now separated from logfile name, initially set with `ENV["LOG_DIR"]` in and `Services` and updated thereafter with `CICTL::LogfileDefaults.logdir=` * Added magic names to send to `--log`: * `today` or `daily` gives `daily_YYYYMMDD.log` * `full` gives `full_YYYYMMDD.log` * any other string gives the name of a logfile _within the logdir_ * Added a `--quiet` option to suppress all STDERR output (normally it shows errors/fatals) * Added a quick log spec that actually works because it checks the file, not stderr * Changed rspec tests to clean up logfile after running
moseshll
force-pushed
the
default_logfile_names
branch
from
August 4, 2023 19:16
5c57fb7
to
f7edc4e
Compare
I rebased against main (w/ canister 0.9.2) in case synchronization was throwing the tests into disarray. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Examples:
cictl index today --log today
cictl index full --log full
cictl index today --log something_different.log (will go to /something_different.log)
A few changes:
CICTL::LogfileDefaults
that defines date_named_file templates and default values for daily/full index logsENV["LOG_DIR"]
inServices
and updated thereafter withCICTL::LogfileDefaults.logdir=
--log
:today
ordaily
givesdaily_YYYYMMDD.log
full
givesfull_YYYYMMDD.log
* any other string gives the name of a logfile within the logdir--quiet
option to suppress all STDERR output (normally it shows errors/fatals)