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

Add reason when logging invalid repository (#1240379) #553

Conversation

jkonecny12
Copy link
Member

Print also exception message which caused the repository removal.

Resolves: rhbz#1240379

@jkonecny12 jkonecny12 added rhel7-branch master Please, use the `f39` label instead. labels Mar 15, 2016
log.error("base repo (%s/%s) not valid -- removing it",
method.method, url)
log.error("base repo (%s/%s) not valid -- removing it\nreason: %s",
method.method, url, e)
Copy link
Contributor

Choose a reason for hiding this comment

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

The \n in there is going to mess up how the logs look. either log it as a separate line, or "-- removing it because: %s"

@bcl bcl added the ACK label Mar 15, 2016
Also print exception message what caused the repository removal.

Resolves: rhbz#1240379
@jkonecny12
Copy link
Member Author

Updated.
The reason message is now on separate line and the message changed slightly to be more self explanation. This could be handy when it's grep-ed without the first line.
Thank you for pointing me on this @bcl .

@jkonecny12
Copy link
Member Author

Pushed

@jkonecny12 jkonecny12 closed this Mar 22, 2016
@jkonecny12 jkonecny12 deleted the rhel7-rfe-inteligent-logging branch March 22, 2016 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
master Please, use the `f39` label instead. rhel7-branch
2 participants