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

Added output for create function. Solves #3561 #4105

Closed
wants to merge 2 commits into from

Conversation

JoshuaRM
Copy link

@JoshuaRM JoshuaRM commented Oct 9, 2018

Solved issue #3561.
The create function now logs the name of the repository to std.err
The output logs the message "Repository x has been created successfully". Where x is the repo name

Create now logs directory name upon completion
Creation function now outputs repository name upon completion.
Copy link
Member

@ThomasWaldmann ThomasWaldmann left a comment

Choose a reason for hiding this comment

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

thanks for your PR!

some feedback about the changes. also please have a look at your commit comments, they could be more expressive.

@@ -534,6 +534,7 @@ def create_inner(archive, cache, fso):
process_file_chunks=cp.process_file_chunks, add_item=archive.add_item,
chunker_params=args.chunker_params, show_progress=args.progress)
create_inner(archive, cache, fso)
logger.error("Repository %s has been created successfully" % archive.name)
Copy link
Member

Choose a reason for hiding this comment

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

Why output it on error level? Check the available logging levels to find something more appropriate.

Also, you are saying "Repository %s", but what you fill into the placeholder is the archive's name, not the repository URL.

@@ -534,6 +534,7 @@ def create_inner(archive, cache, fso):
process_file_chunks=cp.process_file_chunks, add_item=archive.add_item,
chunker_params=args.chunker_params, show_progress=args.progress)
create_inner(archive, cache, fso)
logger.error("Repository %s has been created successfully" % archive.name)
else:
create_inner(None, None, None)
Copy link
Member

Choose a reason for hiding this comment

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

in this branch, there will be no output with your modification. but guess there should be.

dry-run is to simulate a backup run without really writing something, the messages can be the same though.

also maybe move it to before the recursion is started and say something like "Creating archive ... in repository ....".
then we will have that output even in case the backup is aborted later. the final success state is available via --show-rc.

@ThomasWaldmann
Copy link
Member

@ThomasWaldmann
Copy link
Member

@JoshuaRM did you see my feedback?

@ThomasWaldmann
Copy link
Member

No response, no activity - closing this.

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

Successfully merging this pull request may close these issues.

2 participants