Skip to content

Conversation

@maretskiy
Copy link
Contributor

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+7.07%) to 46.945% when pulling 4aa3180 on set-of-small-fixes into ed48a1c on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+7.07%) to 46.945% when pulling 407a6d9 on set-of-small-fixes into ed48a1c on master.

@boris-42
Copy link
Member

@maretskiy I merged another patch seems like we can close this one

except Exception as e:
LOG.error(("Backend '{}' driver '{}' "
"error: {}").format(backend, drv_name, e))
LOG.error("Backend '{}' driver '{}': {}: {}".format(
Copy link

Choose a reason for hiding this comment

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

logging itself formats the string and you should not do it explicitly because logging does it according to the specified level and can skip the formatting if it is not necessary. So, instead of

    LOG.error("Backend '{}' driver '{}': {}: {}".format(backend, drv_name, type(e), e))

you should do:

        LOG.error("Backend '%s' driver '%s': %s: %s", backend, drv_name, type(e), e)

Unfortunately, logging does not support the format style by default.

Copy link

Choose a reason for hiding this comment

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

I changed all such occurrences in seecloud/availability#24 and other projects as well.

"*": {"type": "object"}
}
},
"logging": {
Copy link

Choose a reason for hiding this comment

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

I would suggest not to add this functionality right now and do it properly later by dying the appropriate configuration of logging throught fileConfig or dictConfig in oss-lib.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This commit is already merged by another pull request (as dependency) so let's fix this later during integration with oss-lib

@maretskiy maretskiy closed this Dec 29, 2016
@maretskiy maretskiy reopened this Dec 29, 2016
@maretskiy maretskiy closed this Dec 29, 2016
@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.241% when pulling 58419dd on set-of-small-fixes into c2bf9ac on master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.241% when pulling 58419dd on set-of-small-fixes into c2bf9ac on master.

@boris-42 boris-42 deleted the set-of-small-fixes branch December 29, 2016 20:46
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.

5 participants